We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given
.option('text', { type: 'string', default: function getTheDefault(): string { return 'default'; } )
Typescript gives the typing of the result string | (() => string).
string | (() => string)
However, after parsing without a value what I get for the option is the return value of the function, not the function itself.
As typescript now thinks text could be a function it won't work in places that expect a string.
text
The text was updated successfully, but these errors were encountered:
The TypeScript types are maintained separately on DefinitelyTyped, so you might want to open an issue/discussion there too.
Sorry, something went wrong.
No branches or pull requests
Given
Typescript gives the typing of the result
string | (() => string)
.However, after parsing without a value what I get for the option is the return value of the function, not the function itself.
As typescript now thinks
text
could be a function it won't work in places that expect a string.The text was updated successfully, but these errors were encountered: