diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-06 18:07:26 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-06 18:07:26 +0530 |
| commit | e319818b8cc27450237f4b6b96022458ae478ab2 (patch) | |
| tree | 2c92f4f4b52ead1b879b8e1411ff782fff3dbe6b /src/stdlib/io.ts | |
| parent | 549440bf01ac5fa76d34d0b263f409a9802121e4 (diff) | |
| download | ts-types-lang-e319818b8cc27450237f4b6b96022458ae478ab2.tar.gz ts-types-lang-e319818b8cc27450237f4b6b96022458ae478ab2.zip | |
refactor: splits funcs into stdlib
Diffstat (limited to 'src/stdlib/io.ts')
| -rw-r--r-- | src/stdlib/io.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/stdlib/io.ts b/src/stdlib/io.ts new file mode 100644 index 0000000..00b74b1 --- /dev/null +++ b/src/stdlib/io.ts @@ -0,0 +1,18 @@ +export interface EffectAtom<T = unknown> { output: T } +export type Effect = EffectAtom[] + +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 EffectAtom, Fn extends Kind1> extends EffectAtom { + input: Eff + chainTo: Fn +} + |
