1264
}
1265
requiresArg(keys: string | string[] | Dictionary): YargsInstance {
1266
>
// the 2nd parameter [number] in the argsert the assertion is mandatory
yargs-factory.ts
1267
>
// as populateParserHintSingleValueDictionary recursively calls requiresArg
1268
>
// with Nan as a 2nd parameter, although we ignore it
1269
>
argsert('<array|string|object> [number]', [keys], arguments.length);
1270
>
// If someone configures nargs at the same time as requiresArg,
1271
>
// nargs should take precedence,
1272
>
// see: https://github.com/yargs/yargs/pull/1572
1273
>
// TODO: make this work with aliases, using a check similar to
1274
>
// checkAllAliases() in yargs-parser.
1275
>
if (typeof keys === 'string' && this.#options.narg[keys]) {
1276
return this;
1278
this[kPopulateParserHintSingleValueDictionary](
1279
this.requiresArg.bind(this),