aboutsummaryrefslogtreecommitdiff
path: root/stdlib/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/util.ts')
-rw-r--r--stdlib/util.ts6
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
+