Bug description
let's say there is a type
type TestType =
| { optionalField?: number; test1: number; test2: string }
| { test1: number; test2: string };
so
type OptionalFieldType = TestType['optionalField'];
=> TS2339: Property optionalField does not exist on type TestType
=> its correct, BUT:
IsUnion<TestType> = false
const test: IsUnion<TestType> = true;
=> TS2322: Type true is not assignable to type false
but TestType - union....
Bug description
let's say there is a type
so
=>
TS2339: Property optionalField does not exist on type TestType=> its correct, BUT:
IsUnion<TestType>= false=>
TS2322: Type true is not assignable to type falsebut
TestType- union....