diff --git a/types/fb-watchman/fb-watchman-tests.ts b/types/fb-watchman/fb-watchman-tests.ts index a6f0692278cdd8..717b4677789c3c 100644 --- a/types/fb-watchman/fb-watchman-tests.ts +++ b/types/fb-watchman/fb-watchman-tests.ts @@ -211,3 +211,8 @@ client.on("subscription", (resp) => { } }); }); + +// All commands should accept a callback, including "unofficial" ones +client.command(["watch-del", "/"], () => {}); +// .. and it's optional +client.command(["watch-del-all"]); diff --git a/types/fb-watchman/index.d.ts b/types/fb-watchman/index.d.ts index 4c6553993f4d2a..28c517762394f8 100644 --- a/types/fb-watchman/index.d.ts +++ b/types/fb-watchman/index.d.ts @@ -383,6 +383,7 @@ export class Client extends EventEmitter { ), ...any[], ], + callback?: CommandCallback, ): void; /**