We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3236ac9 commit 3f5c1d2Copy full SHA for 3f5c1d2
src/lib/es5.d.ts
@@ -1559,7 +1559,7 @@ type Readonly<T> = {
1559
* From T, pick a set of properties whose keys are in the union K
1560
*/
1561
type Pick<T, K extends keyof T> = {
1562
- [P in K]: T[P];
+ [P in keyof T as K & P]: T[P];
1563
};
1564
1565
/**
@@ -1582,7 +1582,7 @@ type Extract<T, U> = T extends U ? T : never;
1582
1583
* Construct a type with the properties of T except for those in type K.
1584
1585
-type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
+type Omit<T, K extends keyof any> = { [P in keyof T as Exclude<P, K>]: T[P]; }
1586
1587
1588
* Exclude null and undefined from T
0 commit comments