Skip to content

Commit 7be7b54

Browse files
authored
🤖 Merge PR DefinitelyTyped#73546 fb-watchman: Allow for optional callback argument for all commands, including unofficial ones by @marcins
1 parent 52c8ef6 commit 7be7b54

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎types/fb-watchman/fb-watchman-tests.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,8 @@ client.on("subscription", (resp) => {
211211
}
212212
});
213213
});
214+
215+
// All commands should accept a callback, including "unofficial" ones
216+
client.command(["watch-del", "/"], () => {});
217+
// .. and it's optional
218+
client.command(["watch-del-all"]);

‎types/fb-watchman/index.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ export class Client extends EventEmitter {
383383
),
384384
...any[],
385385
],
386+
callback?: CommandCallback,
386387
): void;
387388

388389
/**

0 commit comments

Comments
 (0)