-
Notifications
You must be signed in to change notification settings - Fork 115
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
FEATURE: template input binding type check #143
Comments
Is there any update on this issue? This is pretty much one of the few bad things about using angular : typesafe template binding. |
This is a big issue in my opinion. This is an even bigger issue because the typing is missing from the part of the app that changes most often. At this point React has much better typescript integration than Angular contra what is usually stated. |
I've also mentioned that there is no autocompletion for custom component inputs. Which may be related to this issue. |
relevant, probably blocking: microsoft/TypeScript#9879 |
This is needed as it's very bug prone: <button (click)="foo('bar')">Click me</button> with a bounded method: // take note of the parameter type, where the template passes through a string.
public foo(bar: boolean): void {
// ...
} This should give some sort of warning at least. Setting the |
Agreed that this is a big issue and needed in the language service. This feature will be available when the language service uses the Ivy compiler as a backend (work on this is underway). |
This has been fixed by the new Ivy-native language service, released in v11.1.0. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Now when you use input binding for Directive or Component existance of used variable is checked which is perfect. But this check does not check if input and variable assigned to it are of same type.
It would be absolutely perfect if it would also check matching type or if it assignable. This is probably request for @angular/language-service.
Thank you
The text was updated successfully, but these errors were encountered: