https://i.sstatic.net/ZaJvb.pngI recently upgraded to Angular 16 and encountered an issue with an @Input() property of type string | string[]. Prior to the upgrade, everything was functioning correctly, but now I am experiencing errors. I am uncertain about where I may have gone wrong in my code. In one of my components, which we'll refer to as MyComponent, I have defined an input property as follows:
@Input() info: string | string[];
Within my application, I utilize this component and pass a value for the info parameter.
Example 1: Example 2: I'm unsure what is causing the problem. Attempted solution included defining a new type like so:export type stringOrArray = string | string[];
However, this did not resolve the error.