diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-01-14 10:24:18 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-01-14 10:24:18 +0530 |
| commit | 2979eda13e25725683aa10292b31f22793c4e0c0 (patch) | |
| tree | 7ec461ec25e06719f6f3344152b9344bfee1f97b /stdlib/effect.ts | |
| parent | 518a6a9ee31f0b03f08cb77bc613b4d708bb640b (diff) | |
| download | ts-types-lang-2979eda13e25725683aa10292b31f22793c4e0c0.tar.gz ts-types-lang-2979eda13e25725683aa10292b31f22793c4e0c0.zip | |
chore: adds fancy syntax for bind functions
Diffstat (limited to '')
| -rw-r--r-- | stdlib/effect.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/stdlib/effect.ts b/stdlib/effect.ts index 5ae9cd9..0662d00 100644 --- a/stdlib/effect.ts +++ b/stdlib/effect.ts @@ -7,7 +7,11 @@ export interface Kind1<Inp = unknown, Out = unknown> { return: Out } -export interface Bind<_Eff extends Effect, _Fn extends Kind1> extends Effect {} +type Func<Inp = unknown, Out = unknown> + = Kind1<Inp, Out> + | (<_T extends Inp>() => Out) + +export interface Bind<_Eff extends Effect, _Fn extends Func> extends Effect {} export interface Seq<_Effs extends Effect[]> extends Effect {} |
