args.adj should be string or string | number but now it is string[], in further it had better to be 'awesome' | 'cool' | 'nice'
friendly could be undefined if not provided, but here typescript think it is non-nullable
(although age is not required, it will throw an error Invalid value for argument: --age (undefined). Expected a number. if not provided age. It is not related to this issue)
Environment
Reproduction
just use
~/playground/hello.ts
Here is a copy:
Describe the bug
There are two errors on type:
args.adj
should bestring
orstring | number
but now it isstring[]
, in further it had better to be'awesome' | 'cool' | 'nice'
friendly
could be undefined if not provided, but here typescript think it is non-nullable(although
age
is not required, it will throw an errorInvalid value for argument: --age (undefined). Expected a number.
if not provided age. It is not related to this issue)Additional context
I will have a pr to fix the problem.
Logs
No response