summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-09-08 04:13:01 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-09-08 04:13:01 +0900
commit3feeaccf5955ebf17c26ccc06f32bb39624b89f6 (patch)
treefa5d7ee54ba77dcc76ff3cae1d6791dcae499f92 /src/utils
parentwip dark (diff)
downloadsharkey-3feeaccf5955ebf17c26ccc06f32bb39624b89f6.tar.gz
sharkey-3feeaccf5955ebf17c26ccc06f32bb39624b89f6.tar.bz2
sharkey-3feeaccf5955ebf17c26ccc06f32bb39624b89f6.zip
Add type definition
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/type.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/type.ts b/src/utils/type.ts
new file mode 100644
index 0000000000..ba6ea0be77
--- /dev/null
+++ b/src/utils/type.ts
@@ -0,0 +1,3 @@
+// https://github.com/Microsoft/TypeScript/issues/12215
+export type Diff<T extends string, U extends string> = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T];
+export type Omit<T, K extends keyof T> = { [P in Diff<keyof T, K>]: T[P] };