22/**
33* Type representing a delayed effect to be lazily evaluated
44*/
5- export type Delay$ < MKH , MKI > = Continue < MKH , MKI > | Stop < MKI >
5+ export type Delay$ < JAJ , JAI > = Continue < JAJ , JAI > | Stop < JAJ >
66
77
88/**
99* Stores an effect to be run later, short circuiting on errors
1010*/
11- export function delay_effect < MKJ , MKK > ( func : ( ) => Result < MKJ , MKK > ) : Delay$ < MKJ , MKK >
11+ export function delay_effect < JAK , JAL > ( func : ( ) => Result < JAK , JAL > ) : Delay$ < JAK , JAL >
1212
1313
1414/**
1515* Chains an operation onto an existing delay. The result of the current delay will be lazily passed to `func`
1616* `func` will not be called if the delay has already returned an error
1717*/
18- export function map < MKP , MKQ , MKT > ( delayed : Delay$ < MKP , MKQ > , func : ( x0 : MKP ) => Result < MKT , MKQ > ) : Delay$ < MKT , MKQ >
18+ export function map < JAQ , JAR , JAU > ( delayed : Delay$ < JAQ , JAR > , func : ( x0 : JAQ ) => Result < JAU , JAR > ) : Delay$ < JAU , JAR >
1919
2020
2121/**
2222* flatten a nested Delay
2323*/
24- export function flatten < MLH , MLI > ( delayed : Delay$ < Delay$ < MLH , MLI > , MLI > ) : Delay$ < MLH , MLI >
24+ export function flatten < JBI , JBJ > ( delayed : Delay$ < Delay$ < JBI , JBJ > , JBJ > ) : Delay$ < JBI , JBJ >
2525
2626
2727/**
2828* Map and then flatten `delayed`
2929*/
30- export function flat_map < MLP , MLQ , MLT > (
31- delayed : Delay$ < MLP , MLQ > ,
32- func : ( x0 : MLP ) => Result < Delay$ < MLT , MLQ > , MLQ >
33- ) : Delay$ < MLT , MLQ >
30+ export function flat_map < JBQ , JBR , JBU > (
31+ delayed : Delay$ < JBQ , JBR > ,
32+ func : ( x0 : JBQ ) => Result < Delay$ < JBU , JBR > , JBR >
33+ ) : Delay$ < JBU , JBR >
3434
3535
3636/**
3737* Run a delayed effect and get the result
3838* short-circuiting if any in delay in the chain returns an Error
3939*/
40- export function run < MNE , MNF > ( delayed : Delay$ < MNE , MNF > ) : Result < MNE , MNF >
40+ export function run < JDF , JDG > ( delayed : Delay$ < JDF , JDG > ) : Result < JDF , JDG >
4141
4242
4343/**
4444* returns a delay, that joins two delays. If `left` fails `right` will not be run, if either fails the result will be an Error
4545*/
46- export function join < MMA , MMB , MME , MMF > (
47- left : Delay$ < MMA , MMB > ,
48- right : Delay$ < MME , MMF >
49- ) : Delay$ < [ MMA , MME ] , [ Option$ < MMB > , Option$ < MMF > ] >
46+ export function join < JCB , JCC , JCF , JCG > (
47+ left : Delay$ < JCB , JCC > ,
48+ right : Delay$ < JCF , JCG >
49+ ) : Delay$ < [ JCB , JCF ] , [ Option$ < JCC > , Option$ < JCG > ] >
5050
5151
5252/**
5353* Returns a new Delay that will be re-attempted `retries` times with `delay` ms in-between
5454* Note: JS uses busy waiting
5555*/
56- export function retry < MMM , MMN > ( delayed : Delay$ < MMM , MMN > , retries : number , delay : number ) : Delay$ < MMM , MMN >
56+ export function retry < JCN , JCO > ( delayed : Delay$ < JCN , JCO > , retries : number , delay : number ) : Delay$ < JCN , JCO >
5757
5858
5959/**
6060* Returns a new Delay that will be re-attempted `retries` times with `delay` ms in-between
6161* Note: JS uses busy waiting
6262*/
63- export function retry_with_backoff < MMS , MMT > ( delayed : Delay$ < MMS , MMT > , retries : number ) : Delay$ < MMS , MMT >
63+ export function retry_with_backoff < JCT , JCU > ( delayed : Delay$ < JCT , JCU > , retries : number ) : Delay$ < JCT , JCU >
6464
6565
6666/**
@@ -73,13 +73,13 @@ export function drain(delayed: Delay$<any, any>): undefined
7373/**
7474* Run every effect in sequence and get their results
7575*/
76- export function every < MNV , MNW > ( effects : List < Delay$ < MNV , MNW > > ) : List < Result < MNV , MNW > >
76+ export function every < JDW , JDX > ( effects : List < Delay$ < JDW , JDX > > ) : List < Result < JDW , JDX > >
7777
7878
7979/**
8080* Repeat a Delay and return the results in a list
8181*/
82- export function repeat < MNO , MNP > ( delayed : Delay$ < MNO , MNP > , repetition : number ) : List < Result < MNO , MNP > >
82+ export function repeat < JDP , JDQ > ( delayed : Delay$ < JDP , JDQ > , repetition : number ) : List < Result < JDP , JDQ > >
8383
8484
8585/**
@@ -100,24 +100,24 @@ export function any(effects: List<Delay$<any, any>>): boolean
100100* Attempt multiple Delays until one returns an Ok
101101* unlike `any/1` this will short circuit on the first Ok
102102*/
103- export function fallthrough < MOY , MOZ > ( effects : List < Delay$ < MOY , MOZ > > ) : Result < MOY , MOZ >
103+ export function fallthrough < JEZ , JFA > ( effects : List < Delay$ < JEZ , JFA > > ) : Result < JEZ , JFA >
104104
105- export class Continue < MKH , MKI > extends CustomType {
105+ export class Continue < JAJ , JAI > extends CustomType {
106106 constructor ( effect : ( ) => Result < any , any > )
107107 effect ( ) : Result < any , any >
108108}
109109
110- export class Stop < MKI > extends CustomType {
111- constructor ( err : MKI )
112- err : MKI
110+ export class Stop < JAJ > extends CustomType {
111+ constructor ( err : JAJ )
112+ err : JAJ
113113}
114114
115115export class Result < T , E > extends CustomType {
116116 static isResult ( data : unknown ) : boolean
117117 isOk ( ) : boolean
118118}
119119
120- export type Option$ < FQ > = Some < FQ > | None
120+ export type Option$ < GA > = Some < GA > | None
121121
122122export class List < T > implements any {
123123 head : T
@@ -136,9 +136,9 @@ export class CustomType {
136136 } ) : this
137137}
138138
139- export class Some < FQ > extends CustomType {
140- constructor ( argument$0 : FQ )
141- 0 : FQ
139+ export class Some < GA > extends CustomType {
140+ constructor ( argument$0 : GA )
141+ 0 : GA
142142}
143143
144144export class None extends CustomType { }
0 commit comments