I have a component with an Input defined as a custom type.
@Input() public labelSize: 'small' | 'normal' | 'large' = 'normal';
But apparently I can pass any kind of parameter to the component tag. I will never have any kind of error/warning.
<my-component labelSize="whatever"></my-component>
I can event pass a number
<my-component labelSize=12345></my-component>
I expected the typescript compiler or angular to give me some feedback on this kind of error.
I'm supposed to validate myself the type of all the Inputs of my components?
Any best practices?
Thanks