summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorこぴなたみぽ <Syuilotan@yahoo.co.jp>2017-11-06 19:08:29 +0900
committerGitHub <noreply@github.com>2017-11-06 19:08:29 +0900
commit734e73ddb67a7af37900e20d51729a80b34d4aa0 (patch)
tree0f6db1884ee9461b5769c26274a3fee513d06654 /src/utils
parentchore(package): update @types/bcryptjs to version 2.4.1 (diff)
parentMerge pull request #852 from syuilo/greenkeeper/@types/mocha-2.2.44 (diff)
downloadmisskey-734e73ddb67a7af37900e20d51729a80b34d4aa0.tar.gz
misskey-734e73ddb67a7af37900e20d51729a80b34d4aa0.tar.bz2
misskey-734e73ddb67a7af37900e20d51729a80b34d4aa0.zip
Merge branch 'master' into greenkeeper/@types/bcryptjs-2.4.1
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] };