I am passing @Input() element variable to the app-child component
<app-child [element]="element"></app-child>
element is an object. It can be of many types, lets say Blue, Red or Green
Inside ChildComponent.ts, how can I determine the type of element and cast it to the correct type? instanceof cannot be used with variables of type any.
`ChildComponent.ts`
@Input() element: any; // is it of type Blue, Red or Green?
Blue,RedorGreenwhy type it asany? You might as well not be using TS.