Closed
Description
Since 0.9.0, expectType
assertions are strict. Buy maybe this isn't always what we want.
type Color = 'red' | 'blue';
expectType<Color>('red');
This will fail because Color
is not assignable to red
unless you explicitly cast it to Color.
type Color = 'red' | 'blue';
expectType<Color>('red' as Color);
Should we add a loose (or unidirectional) expectType
variant for these cases?