Skip to content
New issue

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

Simplify addHelpText TypeScript signature and improve typings test #1516


Copy link

@shadowspawn shadowspawn commented May 8, 2021

Pull Request


Declaring that .addHelpText() callback may return undefined makes for a messy signature. The intent was to allow a falsey value returned to skip display, by just calling return in callback.


Restrict to strings. User can easily return empty string to get the falsey behaviour of skipping display.

Improve the typings test of the callback.


  • TypeScript definition for .addTextHelp() callback no longer allows result of undefined, now just string.

abetomo approved these changes May 9, 2021
Copy link

@abetomo abetomo left a comment


@shadowspawn shadowspawn added the pending release label May 9, 2021
@shadowspawn shadowspawn added this to the v8.0.0 milestone May 9, 2021
@shadowspawn shadowspawn merged commit 8b5599e into tj:release/8.x May 9, 2021
12 checks passed
@shadowspawn shadowspawn deleted the feature/tweak-typings-for-addHelpText branch May 9, 2021
@shadowspawn shadowspawn removed the pending release label Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants