Skip to content

Possible to enforce the type of a template @Input() parameter? #1639

Closed Answered by JamesHenry
ThorstenKunz asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you would write a custom rule which leverages the TypeScript compiler's type checking APIs:

https://typescript-eslint.io/developers/custom-rules#typed-rules

You can also leverage some of the existing utilities from @angular-eslint/utils in your rule implementation

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JamesHenry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants