From 7be7b542855c701434683acb56dd1f12940afc5c Mon Sep 17 00:00:00 2001 From: Marcin Szczepanski Date: Wed, 17 Sep 2025 14:24:44 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73546=20fb-watchma?= =?UTF-8?q?n:=20Allow=20for=20optional=20callback=20argument=20for=20all?= =?UTF-8?q?=20commands,=20including=20unofficial=20ones=20by=20@marcins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/fb-watchman/fb-watchman-tests.ts | 5 +++++ types/fb-watchman/index.d.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/types/fb-watchman/fb-watchman-tests.ts b/types/fb-watchman/fb-watchman-tests.ts index a6f0692278cdd85..717b4677789c3c5 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 4c6553993f4d2a6..28c517762394f80 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; /**