Closed
Description
Since the changes of #31115, Omit<T, K>
makes all properties of T
required.
TypeScript Version: 3.5.0-dev.20190501, 3.4.5
Search Terms: omit optional
Code
type A = {
a: number;
b?: string;
};
type B = Omit<A, 'a'>;
Expected behavior: B
is { b?: string }
({ b?: string | undefined }
with strictNullChecks
).
Actual behavior: B
is { b: string }
({ b: string | undefined }
with strictNullChecks
), with property b
required.
Playground Link: link