add yargs#usage typing (#46983)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46983

X-link: https://github.com/facebook/metro/pull/1370

Add support for `.usage` overload: https://github.com/yargs/yargs/blob/main/docs/api.md#usagemessagecommand-desc-builder-handler

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D64241927

fbshipit-source-id: 9928f08bad16a5e1a6bcfa7c2cf2bfa73668ff57
This commit is contained in:
Blake Friedman 2024-10-11 11:27:09 -07:00 committed by Facebook GitHub Bot
parent c86b5c1232
commit a7023414fd

View File

@ -323,6 +323,7 @@ declare module "yargs" {
updateStrings(obj: { [key: string]: string, ... }): this;
usage(message: string, opts?: { [key: string]: Options, ... }): this;
usage(message: string, desc?: string, builder: CommonModuleObject["builder"], handler: CommonModuleObject["handler"]): this;
version(): this;
version(version: string | false): this;