Skip to content

Commit ba64b4f

Browse files
author
Ben Grynhaus
committed
Better Omit type
1 parent 4f039ad commit ba64b4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
4+
import { IndexSignature } from './index-signature';
5+
import { KnownKeys } from './known-keys';
6+
7+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<KnownKeys<T> & keyof T, K>> & IndexSignature<T>;

0 commit comments

Comments
 (0)