diff options
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/sys.ts | 2 | ||||
| -rw-r--r-- | stdlib/test.ts | 10 | ||||
| -rw-r--r-- | stdlib/util.ts | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/stdlib/sys.ts b/stdlib/sys.ts index 68f713d..9fff7a9 100644 --- a/stdlib/sys.ts +++ b/stdlib/sys.ts @@ -11,3 +11,5 @@ export interface DefineEffect<_Name extends string, _Func extends string> export interface Exit<_ extends number | undefined = undefined> extends Effect {} +export interface SetEvalEnvironment<_Env extends 'test.node' | 'node'> extends Effect {} + diff --git a/stdlib/test.ts b/stdlib/test.ts new file mode 100644 index 0000000..49c6e0e --- /dev/null +++ b/stdlib/test.ts @@ -0,0 +1,10 @@ +import { Effect } from "./effect"; + +export interface Config { + compileTimeTestFailures: false +} + +type Assertion = Config['compileTimeTestFailures'] extends true ? true : boolean + +export interface Assert<_B extends Assertion> extends Effect { } +export interface Test<_m extends string, _effs extends Effect[]> extends Effect { } 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 + |
