initial commit

This commit is contained in:
Wyatt Johnson
2018-06-16 17:20:51 -06:00
commit 02e1236792
39 changed files with 5258 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
export type Diff<T extends keyof any, U extends keyof any> = ({ [P in T]: P } &
{ [P in U]: never } & { [x: string]: never })[T];
export type Omit<U, K extends keyof U> = Pick<U, Diff<keyof U, K>>;
export type Overwrite<T, U> = Pick<T, Diff<keyof T, keyof U>> & U;
export type Sub<T, U> = Pick<T, Diff<keyof T, keyof U>>;
/**
* Make all properties in T writeable
*/
export type Writeable<T> = { -readonly [P in keyof T]: T[P] };