From 8ba316461d2dc0a1372af16836ce14ceabc2bf4f Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 13 Jan 2023 19:21:41 +0530 Subject: feat: adds test to stdlib + refactors runtime environment --- stdlib/util.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'stdlib/util.ts') 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> = { } extends infer Rec extends Pat ? { t: Rec[keyof Rec] } & { [k in keyof Rec]: ADTConstructor } : never + +export type Equals = + [Left] extends [Right] ? ([Right] extends [Left] ? true : false) : false + +export type Not = B extends true ? false : true + -- cgit v1.3.1