What is Light Green Highlight in TypeScript code for Angular?
Yello!
What does this light green background in WebStorm mean? The code is TypeScript, Angular. The field is marked with @Input() attribute. There are no meaningful contextual actions. The highlight goes away if I change the first condition to indexer access (this.data['operator']). Looks like it treats this as some sort of multiple enumeration case in C# or something.

Please sign in to leave a comment.
This can be a type narrowed by a type guard; highlighting can be configured in Settings | Editor | Color Scheme | TypeScript, Variable type narrowed by a type guard
Yep, you're right, changing those settings affects the highlight in this case. Thanks!
Yeah, but what does it mean?
This 'Narrowed to' coloring was introduced to help the users see that the type of the variable is affected by a type guard, and it shows exactly the type inferred by the TypeScript compiler. I.e., this is not a warning, and it doesn't require you to act. It informs you that the TypeScript language assumes that in this place corresponding variable has an altered type, comparing to what it had before.