diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-06 20:07:28 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-06 20:07:28 +0530 |
| commit | a56f093bf08780ab7ed7ef196f031c193a522922 (patch) | |
| tree | f7328d5c154cd7d4521b3bc9575cf89fe6671d5e /src/stdlib/io.ts | |
| parent | d0baefe81d90d44f61322716e20850a7f6f5eaa5 (diff) | |
| download | ts-types-lang-a56f093bf08780ab7ed7ef196f031c193a522922.tar.gz ts-types-lang-a56f093bf08780ab7ed7ef196f031c193a522922.zip | |
feat: we got custom effects baebeeyyy
Diffstat (limited to 'src/stdlib/io.ts')
| -rw-r--r-- | src/stdlib/io.ts | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/stdlib/io.ts b/src/stdlib/io.ts index c1e4574..d8e3ed2 100644 --- a/src/stdlib/io.ts +++ b/src/stdlib/io.ts @@ -1,22 +1,13 @@ -export interface EffectAtom<T = unknown> { output: T } -export type Effect = EffectAtom[] +export interface Effect<T = unknown> { output: T } export interface Kind1<Inp = unknown, Out = unknown> { input: Inp return: Out } -export interface Program<Effs extends Effect, ExitCode extends number = 0> { - effects: Effs, - exitCode: ExitCode, -} +export interface Bind<_Eff extends Effect, _Fn extends Kind1> extends Effect { } -export interface Bind<Eff extends EffectAtom, Fn extends Kind1> extends EffectAtom { - input: Eff - chainTo: Fn -} +export interface Seq<_Effs extends Effect[]> extends Effect { } -export interface Seq<Effs extends EffectAtom[]> extends EffectAtom { - effects: Effs -} +export interface DefineEffect<_Name extends string, _Func extends string> extends Effect { } |
