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
pin @DanielRosenwasser
Since the changes of #31115,
Omit<T, K>makes all properties ofTrequired.TypeScript Version: 3.5.0-dev.20190501, 3.4.5
Search Terms: omit optional
Code
Expected behavior:
Bis{ b?: string }({ b?: string | undefined }withstrictNullChecks).Actual behavior:
Bis{ b: string }({ b: string | undefined }withstrictNullChecks), with propertybrequired.Playground Link: link
pin @DanielRosenwasser