What is Light Green Highlight in TypeScript code for Angular?


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.

Comment actions Permalink

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

Comment actions Permalink

Yep, you're right, changing those settings affects the highlight in this case. Thanks!


Please sign in to leave a comment.