Code Inspection: Unsound type guard check
typeof x type guard can be unsound in one of the following two cases:
typeof x never corresponds to the specified value (e.g., typeof x === 'number' when x has type 'string | boolean')
typeof x always corresponds to the specified value (e.g., typeof x === 'string' when x has type 'string')
x instanceof A type guard can be unsound in one of the following two cases:
Type of x is not related to A
Type of x is A or a subtype of A
Suppress an inspection in the editor
Position the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.
Last modified: 16 July 2021