You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Just .options() takes also deprecate property, too)
Positional argument is necessary to specify as:
.command('cmd','Do command',{},()=>{},[],true)
Because neither of these is working:
.command('cmd','Do command',true)// Error: Invalid third argument. Expected function or object but received boolean..command('cmd','Do command',undefined,undefined,undefined,true)// Error: TypeError: t.map is not a function
The text was updated successfully, but these errors were encountered:
xmedeko
changed the title
command flag deprecated not well documented
Command flag deprecated not well documented
Oct 11, 2022
yargs
can mark command as deprecated. However, it's not documented and it may be tricky.Documentation
Positional and object arguments are described neither in https://yargs.js.org/docs/#api-reference-commandcmd-desc-builder-handler nor in https://github.com/yargs/yargs/blob/main/docs/advanced.md#commands The deprecated and middleware options are missing completely. It would be nice to have same doc like for the options https://yargs.js.org/docs/#api-reference-optionkey-opt
Usage
Object parameter is working OK:
(Just
.options()
takes alsodeprecate
property, too)Positional argument is necessary to specify as:
Because neither of these is working:
The text was updated successfully, but these errors were encountered: