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