diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-05 17:29:17 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-05 17:29:17 +0530 |
| commit | 35419c2bf7444c2ba32172ee0a6c00d88913598c (patch) | |
| tree | e401aec5cbd8501b3974bff1a47778848e5a8962 /src/index.ts | |
| parent | 5f5ea35c634cd97710eb953f930cc4d468c948ce (diff) | |
| download | ts-types-lang-35419c2bf7444c2ba32172ee0a6c00d88913598c.tar.gz ts-types-lang-35419c2bf7444c2ba32172ee0a6c00d88913598c.zip | |
feat: runtime ready yo
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/index.ts b/src/index.ts index accde98..87eea0b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,27 +13,22 @@ export interface Program<Effs extends Effect, ExitCode extends number = 0> { exitCode: ExitCode, } -export interface Kind<Inp = unknown, Out = unknown> { +export interface Kind1<Inp = unknown, Out = unknown> { input: Inp return: Out } -export interface WriteFileC extends Kind<string> { - return: WriteFile<"./somefile.txt", this['input']> -} - -export interface ChainIO<Eff extends EffectAtom, Fn extends Kind> extends EffectAtom { +export interface ChainIO<Eff extends EffectAtom, Fn extends Kind1> extends EffectAtom { input: Eff chainTo: Fn } +export interface PrintK extends Kind1<string> { + return: Print<this['input']> +} + export type main = Program<[ [1, 2, 3] extends infer Res ? Print<Res> : never, - Print<"bye bye">, - ReadFile<"./.gitignore">, - - ChainIO< - ReadFile<"./default.nix">, - WriteFileC - >, + Print<`wow: ${string} -> ${'helo'}`>, + ChainIO<ReadFile<"./default.nix">, PrintK>, ]> |
