600
}
601
demandCommand(
603
>
max?: number | string,
604
>
minMsg?: string | null,
605
>
maxMsg?: string | null
606
>
): YargsInstance {
607
>
argsert(
608
>
'[number] [number|string] [string|null|undefined] [string|null|undefined]',
609
>
[min, max, minMsg, maxMsg],
610
>
arguments.length
611
>
);
612
>
613
>
if (typeof max !== 'number') {
614
minMsg = max;
615
max = Infinity;
616
}
618
>
this.global('_', false);
619
>
620
>
this.#options.demandedCommands._ = {
621
>
min,
622
>
max,
623
>
minMsg,
624
>
maxMsg,
625
>
};
626
>
627
>
return this;
628
>
}
629
demand(
630
keys: string | string[] | Dictionary<string | undefined> | number,