848
}
849
group(opts: string | string[], groupName: string): YargsInstance {
850
>
argsert('<string|array> <string>', [opts, groupName], arguments.length);
yargs-factory.ts
851
>
const existing =
852
>
this.#preservedGroups[groupName] || this.#groups[groupName];
853
>
if (this.#preservedGroups[groupName]) {
854
// we now only need to track this group name in groups.
855
delete this.#preservedGroups[groupName];
856
}
858
>
this.#groups[groupName] = (existing || []).concat(opts).filter(key => {
859
>
if (seen[key]) return false;
860
>
return (seen[key] = true);
861
>
});
862
>
return this;
863
>
}
864
hide(key: string): YargsInstance {
865
argsert('<string>', [key], arguments.length);