Skip to content

Commit 3f5c1d2

Browse files
committed
Update definitions
1 parent 3236ac9 commit 3f5c1d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/es5.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ type Readonly<T> = {
15591559
* From T, pick a set of properties whose keys are in the union K
15601560
*/
15611561
type Pick<T, K extends keyof T> = {
1562-
[P in K]: T[P];
1562+
[P in keyof T as K & P]: T[P];
15631563
};
15641564

15651565
/**
@@ -1582,7 +1582,7 @@ type Extract<T, U> = T extends U ? T : never;
15821582
/**
15831583
* Construct a type with the properties of T except for those in type K.
15841584
*/
1585-
type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
1585+
type Omit<T, K extends keyof any> = { [P in keyof T as Exclude<P, K>]: T[P]; }
15861586

15871587
/**
15881588
* Exclude null and undefined from T

0 commit comments

Comments
 (0)