diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-13 19:21:41 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-13 19:21:41 +0530 |
| commit | 8ba316461d2dc0a1372af16836ce14ceabc2bf4f (patch) | |
| tree | afcd80654b1e83fe78fcb4bf69a71f730ee3e299 /stdlib/util.ts | |
| parent | fe710f58a982e31e64c02d887567bcd9a4108b24 (diff) | |
| download | ts-types-lang-8ba316461d2dc0a1372af16836ce14ceabc2bf4f.tar.gz ts-types-lang-8ba316461d2dc0a1372af16836ce14ceabc2bf4f.zip | |
feat: adds test to stdlib + refactors runtime environment
Diffstat (limited to 'stdlib/util.ts')
| -rw-r--r-- | stdlib/util.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/util.ts b/stdlib/util.ts index cf19589..4851392 100644 --- a/stdlib/util.ts +++ b/stdlib/util.ts @@ -20,3 +20,9 @@ export type ADT<D extends Record<string, any>> = { } extends infer Rec extends Pat ? { t: Rec[keyof Rec] } & { [k in keyof Rec]: ADTConstructor<Rec[k]> } : never + +export type Equals<Left, Right> = + [Left] extends [Right] ? ([Right] extends [Left] ? true : false) : false + +export type Not<B extends boolean> = B extends true ? false : true + |
