-
-
Notifications
You must be signed in to change notification settings - Fork 37
Missing Typings for Event Hooks in HTML Template #40
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
Comments
Custom Events are always showing errors in recent Angular versions within HTML templates and I never found how to fix this kind of issue (I'm not sure it's even possible because of Angular-Language-Service). For example, similar a similar issue was opened in another lib of mine (Angular-Slickgrid), see this discussion, There are 2 things you can do to, you can either cast to I'm going to close this issue as "not doable", unless you know how to fix this, if it's even possible |
I think I may actually see the fix. I'll try making a new fork and see what I can come with. If I figure something out I could create a pull request. |
@ghiscoding I managed to figure this out and made a pull request for this here: #41. |
I read that discussion again that you sent and I should mention that I use Webstorm, not VS Code. So the IDE may just behave differently than that Angular Language Service extension that you mentioned. |
yeah I just saw your PR and merged it, I didn't know it was that simple. I don't think I can apply this type of change to my other lib since it's close to 100 different events. Thanks |
closed by #41 |
Describe the bug
None of the event hooks have proper typings when used in a HTML template. When using an event hook in html like
(onChange)="onMarkdownChange($event)"
it is not recognized and will show the following message:Although this message is shown, everything still compiles successfully and my function still works as expected, so this is only an issue with typings.
Reproduction
Use an event hook like
(onChange)="onMarkdownChange($event)"
Environment Info
Validations
The text was updated successfully, but these errors were encountered: