-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Typescript types: knownHelpers
doesnt allow for custom helpers
#1544
Comments
nknapp
added a commit
that referenced
this issue
Aug 29, 2019
- Add support for custom helpers while keeping the list of builtin-helpers to maintain for autocompletion support closes #1544
Thanks for the offer. I have pushed a slightly different fix. I think in order to get proper auto-completion for the builtin-helpers in IDEs, it is better to keep the builtin names, but still allow any other name. |
Thanks for the quick fix! In which version will it be released? |
Next patch version. I am thinking what would be a good time to do it. I'm planning Tuesday for the next release. |
Released in 4.2.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Before filing issues, please check the following points first:
This will probably help you to get a solution faster.
For bugs, it would be great to have a PR with a failing test-case.
Currently Handlebar's typescript definition don't allow to specify custom helpers on the
knownHelper
option.So, to use the
knownHelpersOnly
option with custom helpers, you have to cast theknownHelpers
in order to by pass typescript checks;The produced error (without using the
unknown
cast) is the following:Shouldn't the
CompilerOptions
have the follow definition?:(Am I not getting something?. I'm willing to send the PR if this is the right fix)
The text was updated successfully, but these errors were encountered: