fp-pack 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fp-pack.umd.js.map +1 -1
- package/dist/implement/async/pipeAsync.d.ts +4 -0
- package/dist/implement/async/pipeAsync.d.ts.map +1 -1
- package/dist/implement/async/pipeAsync.mjs.map +1 -1
- package/dist/implement/async/pipeAsyncSideEffect.d.ts +4 -0
- package/dist/implement/async/pipeAsyncSideEffect.d.ts.map +1 -1
- package/dist/implement/async/pipeAsyncSideEffect.mjs.map +1 -1
- package/dist/implement/async/pipeAsyncSideEffectStrict.d.ts +84 -0
- package/dist/implement/async/pipeAsyncSideEffectStrict.d.ts.map +1 -1
- package/dist/implement/async/pipeAsyncSideEffectStrict.mjs.map +1 -1
- package/dist/implement/composition/pipe.d.ts +8 -0
- package/dist/implement/composition/pipe.d.ts.map +1 -1
- package/dist/implement/composition/pipe.mjs.map +1 -1
- package/dist/implement/composition/pipe.type-test.d.ts +74 -0
- package/dist/implement/composition/pipe.type-test.d.ts.map +1 -1
- package/dist/implement/composition/pipeSideEffect.d.ts +8 -0
- package/dist/implement/composition/pipeSideEffect.d.ts.map +1 -1
- package/dist/implement/composition/pipeSideEffect.mjs.map +1 -1
- package/dist/implement/composition/pipeSideEffectStrict.d.ts +84 -0
- package/dist/implement/composition/pipeSideEffectStrict.d.ts.map +1 -1
- package/dist/implement/composition/pipeSideEffectStrict.mjs.map +1 -1
- package/dist/skills/fp-pack/SKILL.md +1 -1
- package/dist/skills/fp-pack.md +1 -1
- package/package.json +1 -1
- package/src/implement/async/pipeAsync.ts +42 -0
- package/src/implement/async/pipeAsyncSideEffect.ts +42 -0
- package/src/implement/async/pipeAsyncSideEffectStrict.ts +160 -0
- package/src/implement/composition/pipe.ts +84 -0
- package/src/implement/composition/pipe.type-test.ts +249 -0
- package/src/implement/composition/pipeSideEffect.ts +84 -0
- package/src/implement/composition/pipeSideEffectStrict.ts +160 -0
|
@@ -97,6 +97,86 @@ function pipeAsyncSideEffectStrict<B, C, D, E, F, R>(
|
|
|
97
97
|
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
98
98
|
AsyncOrSync<NonSideEffect<Awaited<F>>, R>
|
|
99
99
|
]>;
|
|
100
|
+
function pipeAsyncSideEffectStrict<B, C, D, E, F, G, R>(
|
|
101
|
+
ab: ZeroFn<B>,
|
|
102
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
103
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
104
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
105
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
106
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
107
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, R>
|
|
108
|
+
): PipeAsyncSideEffectStrict<[
|
|
109
|
+
ZeroFn<B>,
|
|
110
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
111
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
112
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
113
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
114
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
115
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, R>
|
|
116
|
+
]>;
|
|
117
|
+
function pipeAsyncSideEffectStrict<B, C, D, E, F, G, H, R>(
|
|
118
|
+
ab: ZeroFn<B>,
|
|
119
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
120
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
121
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
122
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
123
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
124
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
125
|
+
hi: AsyncOrSync<NonSideEffect<Awaited<H>>, R>
|
|
126
|
+
): PipeAsyncSideEffectStrict<[
|
|
127
|
+
ZeroFn<B>,
|
|
128
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
129
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
130
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
131
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
132
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
133
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
134
|
+
AsyncOrSync<NonSideEffect<Awaited<H>>, R>
|
|
135
|
+
]>;
|
|
136
|
+
function pipeAsyncSideEffectStrict<B, C, D, E, F, G, H, I, R>(
|
|
137
|
+
ab: ZeroFn<B>,
|
|
138
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
139
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
140
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
141
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
142
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
143
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
144
|
+
hi: AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
145
|
+
ij: AsyncOrSync<NonSideEffect<Awaited<I>>, R>
|
|
146
|
+
): PipeAsyncSideEffectStrict<[
|
|
147
|
+
ZeroFn<B>,
|
|
148
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
149
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
150
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
151
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
152
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
153
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
154
|
+
AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
155
|
+
AsyncOrSync<NonSideEffect<Awaited<I>>, R>
|
|
156
|
+
]>;
|
|
157
|
+
function pipeAsyncSideEffectStrict<B, C, D, E, F, G, H, I, J, R>(
|
|
158
|
+
ab: ZeroFn<B>,
|
|
159
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
160
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
161
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
162
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
163
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
164
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
165
|
+
hi: AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
166
|
+
ij: AsyncOrSync<NonSideEffect<Awaited<I>>, J>,
|
|
167
|
+
jk: AsyncOrSync<NonSideEffect<Awaited<J>>, R>
|
|
168
|
+
): PipeAsyncSideEffectStrict<[
|
|
169
|
+
ZeroFn<B>,
|
|
170
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
171
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
172
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
173
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
174
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
175
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
176
|
+
AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
177
|
+
AsyncOrSync<NonSideEffect<Awaited<I>>, J>,
|
|
178
|
+
AsyncOrSync<NonSideEffect<Awaited<J>>, R>
|
|
179
|
+
]>;
|
|
100
180
|
function pipeAsyncSideEffectStrict<A, R>(
|
|
101
181
|
ab: AsyncOrSync<A, R>
|
|
102
182
|
): PipeAsyncSideEffectStrict<[AsyncOrSync<A, R>]>;
|
|
@@ -152,6 +232,86 @@ function pipeAsyncSideEffectStrict<A, B, C, D, E, F, R>(
|
|
|
152
232
|
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
153
233
|
AsyncOrSync<NonSideEffect<Awaited<F>>, R>
|
|
154
234
|
]>;
|
|
235
|
+
function pipeAsyncSideEffectStrict<A, B, C, D, E, F, G, R>(
|
|
236
|
+
ab: AsyncOrSync<A, B>,
|
|
237
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
238
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
239
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
240
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
241
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
242
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, R>
|
|
243
|
+
): PipeAsyncSideEffectStrict<[
|
|
244
|
+
AsyncOrSync<A, B>,
|
|
245
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
246
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
247
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
248
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
249
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
250
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, R>
|
|
251
|
+
]>;
|
|
252
|
+
function pipeAsyncSideEffectStrict<A, B, C, D, E, F, G, H, R>(
|
|
253
|
+
ab: AsyncOrSync<A, B>,
|
|
254
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
255
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
256
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
257
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
258
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
259
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
260
|
+
hi: AsyncOrSync<NonSideEffect<Awaited<H>>, R>
|
|
261
|
+
): PipeAsyncSideEffectStrict<[
|
|
262
|
+
AsyncOrSync<A, B>,
|
|
263
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
264
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
265
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
266
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
267
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
268
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
269
|
+
AsyncOrSync<NonSideEffect<Awaited<H>>, R>
|
|
270
|
+
]>;
|
|
271
|
+
function pipeAsyncSideEffectStrict<A, B, C, D, E, F, G, H, I, R>(
|
|
272
|
+
ab: AsyncOrSync<A, B>,
|
|
273
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
274
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
275
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
276
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
277
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
278
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
279
|
+
hi: AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
280
|
+
ij: AsyncOrSync<NonSideEffect<Awaited<I>>, R>
|
|
281
|
+
): PipeAsyncSideEffectStrict<[
|
|
282
|
+
AsyncOrSync<A, B>,
|
|
283
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
284
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
285
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
286
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
287
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
288
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
289
|
+
AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
290
|
+
AsyncOrSync<NonSideEffect<Awaited<I>>, R>
|
|
291
|
+
]>;
|
|
292
|
+
function pipeAsyncSideEffectStrict<A, B, C, D, E, F, G, H, I, J, R>(
|
|
293
|
+
ab: AsyncOrSync<A, B>,
|
|
294
|
+
bc: AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
295
|
+
cd: AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
296
|
+
de: AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
297
|
+
ef: AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
298
|
+
fg: AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
299
|
+
gh: AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
300
|
+
hi: AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
301
|
+
ij: AsyncOrSync<NonSideEffect<Awaited<I>>, J>,
|
|
302
|
+
jk: AsyncOrSync<NonSideEffect<Awaited<J>>, R>
|
|
303
|
+
): PipeAsyncSideEffectStrict<[
|
|
304
|
+
AsyncOrSync<A, B>,
|
|
305
|
+
AsyncOrSync<NonSideEffect<Awaited<B>>, C>,
|
|
306
|
+
AsyncOrSync<NonSideEffect<Awaited<C>>, D>,
|
|
307
|
+
AsyncOrSync<NonSideEffect<Awaited<D>>, E>,
|
|
308
|
+
AsyncOrSync<NonSideEffect<Awaited<E>>, F>,
|
|
309
|
+
AsyncOrSync<NonSideEffect<Awaited<F>>, G>,
|
|
310
|
+
AsyncOrSync<NonSideEffect<Awaited<G>>, H>,
|
|
311
|
+
AsyncOrSync<NonSideEffect<Awaited<H>>, I>,
|
|
312
|
+
AsyncOrSync<NonSideEffect<Awaited<I>>, J>,
|
|
313
|
+
AsyncOrSync<NonSideEffect<Awaited<J>>, R>
|
|
314
|
+
]>;
|
|
155
315
|
|
|
156
316
|
function pipeAsyncSideEffectStrict<Fns extends [AnyFn, ...AnyFn[]]>(...funcs: Fns): PipeAsyncSideEffectStrict<Fns>;
|
|
157
317
|
function pipeAsyncSideEffectStrict(...funcs: Array<AsyncOrSync<any, any>>) {
|
|
@@ -31,6 +31,48 @@ function pipe<B, C, D, E, F, R>(
|
|
|
31
31
|
ef: UnaryFn<E, F>,
|
|
32
32
|
fg: UnaryFn<F, R>
|
|
33
33
|
): () => R;
|
|
34
|
+
function pipe<B, C, D, E, F, G, R>(
|
|
35
|
+
ab: ZeroFn<B>,
|
|
36
|
+
bc: UnaryFn<B, C>,
|
|
37
|
+
cd: UnaryFn<C, D>,
|
|
38
|
+
de: UnaryFn<D, E>,
|
|
39
|
+
ef: UnaryFn<E, F>,
|
|
40
|
+
fg: UnaryFn<F, G>,
|
|
41
|
+
gh: UnaryFn<G, R>
|
|
42
|
+
): () => R;
|
|
43
|
+
function pipe<B, C, D, E, F, G, H, R>(
|
|
44
|
+
ab: ZeroFn<B>,
|
|
45
|
+
bc: UnaryFn<B, C>,
|
|
46
|
+
cd: UnaryFn<C, D>,
|
|
47
|
+
de: UnaryFn<D, E>,
|
|
48
|
+
ef: UnaryFn<E, F>,
|
|
49
|
+
fg: UnaryFn<F, G>,
|
|
50
|
+
gh: UnaryFn<G, H>,
|
|
51
|
+
hi: UnaryFn<H, R>
|
|
52
|
+
): () => R;
|
|
53
|
+
function pipe<B, C, D, E, F, G, H, I, R>(
|
|
54
|
+
ab: ZeroFn<B>,
|
|
55
|
+
bc: UnaryFn<B, C>,
|
|
56
|
+
cd: UnaryFn<C, D>,
|
|
57
|
+
de: UnaryFn<D, E>,
|
|
58
|
+
ef: UnaryFn<E, F>,
|
|
59
|
+
fg: UnaryFn<F, G>,
|
|
60
|
+
gh: UnaryFn<G, H>,
|
|
61
|
+
hi: UnaryFn<H, I>,
|
|
62
|
+
ij: UnaryFn<I, R>
|
|
63
|
+
): () => R;
|
|
64
|
+
function pipe<B, C, D, E, F, G, H, I, J, R>(
|
|
65
|
+
ab: ZeroFn<B>,
|
|
66
|
+
bc: UnaryFn<B, C>,
|
|
67
|
+
cd: UnaryFn<C, D>,
|
|
68
|
+
de: UnaryFn<D, E>,
|
|
69
|
+
ef: UnaryFn<E, F>,
|
|
70
|
+
fg: UnaryFn<F, G>,
|
|
71
|
+
gh: UnaryFn<G, H>,
|
|
72
|
+
hi: UnaryFn<H, I>,
|
|
73
|
+
ij: UnaryFn<I, J>,
|
|
74
|
+
jk: UnaryFn<J, R>
|
|
75
|
+
): () => R;
|
|
34
76
|
function pipe<A, R>(ab: UnaryFn<A, R>): (a: A) => R;
|
|
35
77
|
function pipe<A, B, R>(ab: UnaryFn<A, B>, bc: UnaryFn<B, R>): (a: A) => R;
|
|
36
78
|
function pipe<A, B, C, R>(ab: UnaryFn<A, B>, bc: UnaryFn<B, C>, cd: UnaryFn<C, R>): (a: A) => R;
|
|
@@ -55,6 +97,48 @@ function pipe<A, B, C, D, E, F, R>(
|
|
|
55
97
|
ef: UnaryFn<E, F>,
|
|
56
98
|
fg: UnaryFn<F, R>
|
|
57
99
|
): (a: A) => R;
|
|
100
|
+
function pipe<A, B, C, D, E, F, G, R>(
|
|
101
|
+
ab: UnaryFn<A, B>,
|
|
102
|
+
bc: UnaryFn<B, C>,
|
|
103
|
+
cd: UnaryFn<C, D>,
|
|
104
|
+
de: UnaryFn<D, E>,
|
|
105
|
+
ef: UnaryFn<E, F>,
|
|
106
|
+
fg: UnaryFn<F, G>,
|
|
107
|
+
gh: UnaryFn<G, R>
|
|
108
|
+
): (a: A) => R;
|
|
109
|
+
function pipe<A, B, C, D, E, F, G, H, R>(
|
|
110
|
+
ab: UnaryFn<A, B>,
|
|
111
|
+
bc: UnaryFn<B, C>,
|
|
112
|
+
cd: UnaryFn<C, D>,
|
|
113
|
+
de: UnaryFn<D, E>,
|
|
114
|
+
ef: UnaryFn<E, F>,
|
|
115
|
+
fg: UnaryFn<F, G>,
|
|
116
|
+
gh: UnaryFn<G, H>,
|
|
117
|
+
hi: UnaryFn<H, R>
|
|
118
|
+
): (a: A) => R;
|
|
119
|
+
function pipe<A, B, C, D, E, F, G, H, I, R>(
|
|
120
|
+
ab: UnaryFn<A, B>,
|
|
121
|
+
bc: UnaryFn<B, C>,
|
|
122
|
+
cd: UnaryFn<C, D>,
|
|
123
|
+
de: UnaryFn<D, E>,
|
|
124
|
+
ef: UnaryFn<E, F>,
|
|
125
|
+
fg: UnaryFn<F, G>,
|
|
126
|
+
gh: UnaryFn<G, H>,
|
|
127
|
+
hi: UnaryFn<H, I>,
|
|
128
|
+
ij: UnaryFn<I, R>
|
|
129
|
+
): (a: A) => R;
|
|
130
|
+
function pipe<A, B, C, D, E, F, G, H, I, J, R>(
|
|
131
|
+
ab: UnaryFn<A, B>,
|
|
132
|
+
bc: UnaryFn<B, C>,
|
|
133
|
+
cd: UnaryFn<C, D>,
|
|
134
|
+
de: UnaryFn<D, E>,
|
|
135
|
+
ef: UnaryFn<E, F>,
|
|
136
|
+
fg: UnaryFn<F, G>,
|
|
137
|
+
gh: UnaryFn<G, H>,
|
|
138
|
+
hi: UnaryFn<H, I>,
|
|
139
|
+
ij: UnaryFn<I, J>,
|
|
140
|
+
jk: UnaryFn<J, R>
|
|
141
|
+
): (a: A) => R;
|
|
58
142
|
|
|
59
143
|
function pipe<Fns extends [UnaryFn<any, any>, ...UnaryFn<any, any>[]]>(...funcs: Fns): Pipe<Fns>;
|
|
60
144
|
function pipe(...funcs: Array<UnaryFn<any, any>>): (input: any) => any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import SideEffect from './sideEffect';
|
|
2
|
+
import from from './from';
|
|
2
3
|
import pipe from './pipe';
|
|
3
4
|
import pipeSideEffect from './pipeSideEffect';
|
|
4
5
|
import pipeSideEffectStrict from './pipeSideEffectStrict';
|
|
@@ -36,6 +37,40 @@ export const purePipeSix = pipe(
|
|
|
36
37
|
type PurePipeSixExpected = (input: number) => string;
|
|
37
38
|
export type PipePureSixIsStrict = Expect<Equal<typeof purePipeSix, PurePipeSixExpected>>;
|
|
38
39
|
|
|
40
|
+
export const purePipeTen = pipe(
|
|
41
|
+
(value: number) => value + 1,
|
|
42
|
+
(value) => value * 2,
|
|
43
|
+
(value) => `v:${value}`,
|
|
44
|
+
(value) => value.toUpperCase(),
|
|
45
|
+
(value) => value.length,
|
|
46
|
+
(value) => value + 1,
|
|
47
|
+
(value) => `${value}`,
|
|
48
|
+
(value) => value.padStart(3, '0'),
|
|
49
|
+
(value) => value.length,
|
|
50
|
+
(value) => `n:${value}`
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
type PurePipeTenExpected = (input: number) => string;
|
|
54
|
+
export type PipePureTenIsStrict = Expect<Equal<typeof purePipeTen, PurePipeTenExpected>>;
|
|
55
|
+
|
|
56
|
+
export const pipeFromTen = pipe(
|
|
57
|
+
from(1),
|
|
58
|
+
(value) => value + 1,
|
|
59
|
+
(value) => value * 2,
|
|
60
|
+
(value) => `${value}`,
|
|
61
|
+
(value) => value.padStart(3, '0'),
|
|
62
|
+
(value) => value.length,
|
|
63
|
+
(value) => value + 1,
|
|
64
|
+
(value) => `${value}`,
|
|
65
|
+
(value) => value.padStart(4, '0'),
|
|
66
|
+
(value) => `n:${value}`
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
export const pipeFromTenValue = pipeFromTen('input');
|
|
70
|
+
|
|
71
|
+
type PipeFromTenValueExpected = string;
|
|
72
|
+
export type PipeFromTenValueIsStrict = Expect<Equal<typeof pipeFromTenValue, PipeFromTenValueExpected>>;
|
|
73
|
+
|
|
39
74
|
export const pipeWithSideEffectInput = pipeSideEffect(
|
|
40
75
|
(value: number) => value + 1,
|
|
41
76
|
(value) => value * 2,
|
|
@@ -59,6 +94,42 @@ export const pipeSideEffectSix = pipeSideEffect(
|
|
|
59
94
|
type PipeSideEffectSixExpected = (input: number | SideEffect<any>) => string | SideEffect<any>;
|
|
60
95
|
export type PipeSideEffectSixIsStrict = Expect<Equal<typeof pipeSideEffectSix, PipeSideEffectSixExpected>>;
|
|
61
96
|
|
|
97
|
+
export const pipeSideEffectTen = pipeSideEffect(
|
|
98
|
+
(value: number) => value + 1,
|
|
99
|
+
(value) => value * 2,
|
|
100
|
+
(value) => `v:${value}`,
|
|
101
|
+
(value) => value.toUpperCase(),
|
|
102
|
+
(value) => value.length,
|
|
103
|
+
(value) => value + 1,
|
|
104
|
+
(value) => `${value}`,
|
|
105
|
+
(value) => value.padStart(3, '0'),
|
|
106
|
+
(value) => value.length,
|
|
107
|
+
(value) => `n:${value}`
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
type PipeSideEffectTenExpected = (input: number | SideEffect<any>) => string | SideEffect<any>;
|
|
111
|
+
export type PipeSideEffectTenIsStrict = Expect<Equal<typeof pipeSideEffectTen, PipeSideEffectTenExpected>>;
|
|
112
|
+
|
|
113
|
+
export const pipeSideEffectFromTen = pipeSideEffect(
|
|
114
|
+
from(1),
|
|
115
|
+
(value) => value + 1,
|
|
116
|
+
(value) => value * 2,
|
|
117
|
+
(value) => `${value}`,
|
|
118
|
+
(value) => value.padStart(3, '0'),
|
|
119
|
+
(value) => value.length,
|
|
120
|
+
(value) => value + 1,
|
|
121
|
+
(value) => `${value}`,
|
|
122
|
+
(value) => value.padStart(4, '0'),
|
|
123
|
+
(value) => `n:${value}`
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
export const pipeSideEffectFromTenValue = pipeSideEffectFromTen('input');
|
|
127
|
+
|
|
128
|
+
type PipeSideEffectFromTenValueExpected = string | SideEffect<any>;
|
|
129
|
+
export type PipeSideEffectFromTenValueIsStrict = Expect<
|
|
130
|
+
Equal<typeof pipeSideEffectFromTenValue, PipeSideEffectFromTenValueExpected>
|
|
131
|
+
>;
|
|
132
|
+
|
|
62
133
|
export const purePipeAsync = pipeAsync(
|
|
63
134
|
(value: number) => value + 1,
|
|
64
135
|
async (value) => value * 2,
|
|
@@ -80,6 +151,42 @@ export const purePipeAsyncSix = pipeAsync(
|
|
|
80
151
|
type PurePipeAsyncSixExpected = (input: number) => Promise<string>;
|
|
81
152
|
export type PipeAsyncPureSixIsStrict = Expect<Equal<typeof purePipeAsyncSix, PurePipeAsyncSixExpected>>;
|
|
82
153
|
|
|
154
|
+
export const purePipeAsyncTen = pipeAsync(
|
|
155
|
+
(value: number) => value + 1,
|
|
156
|
+
async (value) => value * 2,
|
|
157
|
+
(value) => `${value}`,
|
|
158
|
+
async (value) => value.length,
|
|
159
|
+
(value) => value + 3,
|
|
160
|
+
async (value) => value * 2,
|
|
161
|
+
(value) => `${value}`,
|
|
162
|
+
async (value) => value.length,
|
|
163
|
+
(value) => value + 1,
|
|
164
|
+
async (value) => `n:${value}`
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
type PurePipeAsyncTenExpected = (input: number) => Promise<string>;
|
|
168
|
+
export type PipeAsyncPureTenIsStrict = Expect<Equal<typeof purePipeAsyncTen, PurePipeAsyncTenExpected>>;
|
|
169
|
+
|
|
170
|
+
export const pipeAsyncFromTen = pipeAsync(
|
|
171
|
+
from(1),
|
|
172
|
+
async (value) => value + 1,
|
|
173
|
+
(value) => value * 2,
|
|
174
|
+
async (value) => `${value}`,
|
|
175
|
+
(value) => value.padStart(3, '0'),
|
|
176
|
+
async (value) => value.length,
|
|
177
|
+
(value) => value + 1,
|
|
178
|
+
async (value) => `${value}`,
|
|
179
|
+
(value) => value.padStart(4, '0'),
|
|
180
|
+
async (value) => `n:${value}`
|
|
181
|
+
);
|
|
182
|
+
|
|
183
|
+
export const pipeAsyncFromTenValue = pipeAsyncFromTen('input');
|
|
184
|
+
|
|
185
|
+
type PipeAsyncFromTenValueExpected = Promise<string>;
|
|
186
|
+
export type PipeAsyncFromTenValueIsStrict = Expect<
|
|
187
|
+
Equal<typeof pipeAsyncFromTenValue, PipeAsyncFromTenValueExpected>
|
|
188
|
+
>;
|
|
189
|
+
|
|
83
190
|
export const pipeAsyncWithSideEffectInput = pipeAsyncSideEffect(
|
|
84
191
|
(value: number) => value + 1,
|
|
85
192
|
async (value) => value * 2,
|
|
@@ -107,6 +214,44 @@ export type PipeAsyncSideEffectSixIsStrict = Expect<
|
|
|
107
214
|
Equal<typeof pipeAsyncSideEffectSix, PipeAsyncSideEffectSixExpected>
|
|
108
215
|
>;
|
|
109
216
|
|
|
217
|
+
export const pipeAsyncSideEffectTen = pipeAsyncSideEffect(
|
|
218
|
+
(value: number) => value + 1,
|
|
219
|
+
async (value) => value * 2,
|
|
220
|
+
(value) => `${value}`,
|
|
221
|
+
async (value) => value.length,
|
|
222
|
+
(value) => value + 3,
|
|
223
|
+
async (value) => value * 2,
|
|
224
|
+
(value) => `${value}`,
|
|
225
|
+
async (value) => value.length,
|
|
226
|
+
(value) => value + 1,
|
|
227
|
+
async (value) => `n:${value}`
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
type PipeAsyncSideEffectTenExpected = (input: number | SideEffect<any>) => Promise<string | SideEffect<any>>;
|
|
231
|
+
export type PipeAsyncSideEffectTenIsStrict = Expect<
|
|
232
|
+
Equal<typeof pipeAsyncSideEffectTen, PipeAsyncSideEffectTenExpected>
|
|
233
|
+
>;
|
|
234
|
+
|
|
235
|
+
export const pipeAsyncSideEffectFromTen = pipeAsyncSideEffect(
|
|
236
|
+
from(1),
|
|
237
|
+
async (value) => value + 1,
|
|
238
|
+
(value) => value * 2,
|
|
239
|
+
async (value) => `${value}`,
|
|
240
|
+
(value) => value.padStart(3, '0'),
|
|
241
|
+
async (value) => value.length,
|
|
242
|
+
(value) => value + 1,
|
|
243
|
+
async (value) => `${value}`,
|
|
244
|
+
(value) => value.padStart(4, '0'),
|
|
245
|
+
async (value) => `n:${value}`
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
export const pipeAsyncSideEffectFromTenValue = pipeAsyncSideEffectFromTen('input');
|
|
249
|
+
|
|
250
|
+
type PipeAsyncSideEffectFromTenValueExpected = Promise<string | SideEffect<any>>;
|
|
251
|
+
export type PipeAsyncSideEffectFromTenValueIsStrict = Expect<
|
|
252
|
+
Equal<typeof pipeAsyncSideEffectFromTenValue, PipeAsyncSideEffectFromTenValueExpected>
|
|
253
|
+
>;
|
|
254
|
+
|
|
110
255
|
export const strictPipeSideEffect = pipeSideEffectStrict(
|
|
111
256
|
(value: number) => value + 1,
|
|
112
257
|
(value) => (value > 1 ? value : SideEffect.of(() => 'LOW' as const)),
|
|
@@ -150,6 +295,54 @@ type StrictSixValue = ValueUnion<typeof strictPipeSideEffectSixResult>;
|
|
|
150
295
|
type StrictSixValueExpected = number;
|
|
151
296
|
export type PipeSideEffectStrictSixValue = Expect<Equal<StrictSixValue, StrictSixValueExpected>>;
|
|
152
297
|
|
|
298
|
+
export const strictPipeSideEffectTen = pipeSideEffectStrict(
|
|
299
|
+
(value: number) => value + 1,
|
|
300
|
+
(value) => (value > 1 ? value : SideEffect.of(() => 'LOW' as const)),
|
|
301
|
+
(value) => value + 1,
|
|
302
|
+
(value) => (value > 3 ? value : SideEffect.of(() => 'MID' as const)),
|
|
303
|
+
(value) => value * 2,
|
|
304
|
+
(value) => value + 1,
|
|
305
|
+
(value) => (value > 10 ? value : SideEffect.of(() => 0 as const)),
|
|
306
|
+
(value) => value + 1,
|
|
307
|
+
(value) => value * 2,
|
|
308
|
+
(value) => value + 1
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
export const strictPipeSideEffectTenResult = strictPipeSideEffectTen(1);
|
|
312
|
+
|
|
313
|
+
type StrictTenEffects = EffectUnion<typeof strictPipeSideEffectTenResult>;
|
|
314
|
+
type StrictTenEffectsExpected = 'LOW' | 'MID' | 0;
|
|
315
|
+
export type PipeSideEffectStrictTenEffects = Expect<Equal<StrictTenEffects, StrictTenEffectsExpected>>;
|
|
316
|
+
|
|
317
|
+
type StrictTenValue = ValueUnion<typeof strictPipeSideEffectTenResult>;
|
|
318
|
+
type StrictTenValueExpected = number;
|
|
319
|
+
export type PipeSideEffectStrictTenValue = Expect<Equal<StrictTenValue, StrictTenValueExpected>>;
|
|
320
|
+
|
|
321
|
+
export const strictPipeSideEffectFromTen = pipeSideEffectStrict(
|
|
322
|
+
from(1),
|
|
323
|
+
(value) => value + 1,
|
|
324
|
+
(value) => (value > 1 ? value : SideEffect.of(() => 'LOW' as const)),
|
|
325
|
+
(value) => value * 2,
|
|
326
|
+
(value) => (value > 4 ? value : SideEffect.of(() => 'MID' as const)),
|
|
327
|
+
(value) => value + 1,
|
|
328
|
+
(value) => value * 2,
|
|
329
|
+
(value) => (value > 20 ? value : SideEffect.of(() => 0 as const)),
|
|
330
|
+
(value) => value + 1,
|
|
331
|
+
(value) => value * 2
|
|
332
|
+
);
|
|
333
|
+
|
|
334
|
+
export const strictPipeSideEffectFromTenResult = strictPipeSideEffectFromTen('input');
|
|
335
|
+
|
|
336
|
+
type StrictFromTenEffects = EffectUnion<typeof strictPipeSideEffectFromTenResult>;
|
|
337
|
+
type StrictFromTenEffectsExpected = 'LOW' | 'MID' | 0;
|
|
338
|
+
export type PipeSideEffectStrictFromTenEffects = Expect<
|
|
339
|
+
Equal<StrictFromTenEffects, StrictFromTenEffectsExpected>
|
|
340
|
+
>;
|
|
341
|
+
|
|
342
|
+
type StrictFromTenValue = ValueUnion<typeof strictPipeSideEffectFromTenResult>;
|
|
343
|
+
type StrictFromTenValueExpected = number;
|
|
344
|
+
export type PipeSideEffectStrictFromTenValue = Expect<Equal<StrictFromTenValue, StrictFromTenValueExpected>>;
|
|
345
|
+
|
|
153
346
|
export const strictPipeAsyncSideEffect = pipeAsyncSideEffectStrict(
|
|
154
347
|
(value: number) => value + 1,
|
|
155
348
|
async (value) => (value > 1 ? value : SideEffect.of(() => 'LOW' as const)),
|
|
@@ -194,3 +387,59 @@ type StrictAsyncSixValueExpected = number;
|
|
|
194
387
|
export type PipeAsyncSideEffectStrictSixValue = Expect<
|
|
195
388
|
Equal<StrictAsyncSixValue, StrictAsyncSixValueExpected>
|
|
196
389
|
>;
|
|
390
|
+
|
|
391
|
+
export const strictPipeAsyncSideEffectTen = pipeAsyncSideEffectStrict(
|
|
392
|
+
(value: number) => value + 1,
|
|
393
|
+
async (value) => (value > 1 ? value : SideEffect.of(() => 'LOW' as const)),
|
|
394
|
+
(value) => value + 1,
|
|
395
|
+
async (value) => (value > 3 ? value : SideEffect.of(() => 'MID' as const)),
|
|
396
|
+
(value) => value * 2,
|
|
397
|
+
async (value) => value + 1,
|
|
398
|
+
(value) => (value > 10 ? value : SideEffect.of(() => 0 as const)),
|
|
399
|
+
async (value) => value + 1,
|
|
400
|
+
(value) => value * 2,
|
|
401
|
+
async (value) => value + 1
|
|
402
|
+
);
|
|
403
|
+
|
|
404
|
+
export const strictPipeAsyncSideEffectTenResult = strictPipeAsyncSideEffectTen(1);
|
|
405
|
+
|
|
406
|
+
type StrictAsyncTenResolved = Awaited<typeof strictPipeAsyncSideEffectTenResult>;
|
|
407
|
+
type StrictAsyncTenEffects = EffectUnion<StrictAsyncTenResolved>;
|
|
408
|
+
type StrictAsyncTenEffectsExpected = 'LOW' | 'MID' | 0;
|
|
409
|
+
export type PipeAsyncSideEffectStrictTenEffects = Expect<
|
|
410
|
+
Equal<StrictAsyncTenEffects, StrictAsyncTenEffectsExpected>
|
|
411
|
+
>;
|
|
412
|
+
|
|
413
|
+
type StrictAsyncTenValue = ValueUnion<StrictAsyncTenResolved>;
|
|
414
|
+
type StrictAsyncTenValueExpected = number;
|
|
415
|
+
export type PipeAsyncSideEffectStrictTenValue = Expect<
|
|
416
|
+
Equal<StrictAsyncTenValue, StrictAsyncTenValueExpected>
|
|
417
|
+
>;
|
|
418
|
+
|
|
419
|
+
export const strictPipeAsyncSideEffectFromTen = pipeAsyncSideEffectStrict(
|
|
420
|
+
from(1),
|
|
421
|
+
async (value) => value + 1,
|
|
422
|
+
(value) => (value > 1 ? value : SideEffect.of(() => 'LOW' as const)),
|
|
423
|
+
async (value) => value * 2,
|
|
424
|
+
(value) => (value > 4 ? value : SideEffect.of(() => 'MID' as const)),
|
|
425
|
+
async (value) => value + 1,
|
|
426
|
+
(value) => value * 2,
|
|
427
|
+
async (value) => (value > 20 ? value : SideEffect.of(() => 0 as const)),
|
|
428
|
+
(value) => value + 1,
|
|
429
|
+
async (value) => value * 2
|
|
430
|
+
);
|
|
431
|
+
|
|
432
|
+
export const strictPipeAsyncSideEffectFromTenResult = strictPipeAsyncSideEffectFromTen('input');
|
|
433
|
+
|
|
434
|
+
type StrictAsyncFromTenResolved = Awaited<typeof strictPipeAsyncSideEffectFromTenResult>;
|
|
435
|
+
type StrictAsyncFromTenEffects = EffectUnion<StrictAsyncFromTenResolved>;
|
|
436
|
+
type StrictAsyncFromTenEffectsExpected = 'LOW' | 'MID' | 0;
|
|
437
|
+
export type PipeAsyncSideEffectStrictFromTenEffects = Expect<
|
|
438
|
+
Equal<StrictAsyncFromTenEffects, StrictAsyncFromTenEffectsExpected>
|
|
439
|
+
>;
|
|
440
|
+
|
|
441
|
+
type StrictAsyncFromTenValue = ValueUnion<StrictAsyncFromTenResolved>;
|
|
442
|
+
type StrictAsyncFromTenValueExpected = number;
|
|
443
|
+
export type PipeAsyncSideEffectStrictFromTenValue = Expect<
|
|
444
|
+
Equal<StrictAsyncFromTenValue, StrictAsyncFromTenValueExpected>
|
|
445
|
+
>;
|
|
@@ -43,6 +43,48 @@ function pipeSideEffect<B, C, D, E, F, R>(
|
|
|
43
43
|
ef: UnaryFn<E, F>,
|
|
44
44
|
fg: UnaryFn<F, R>
|
|
45
45
|
): () => MaybeSideEffect<R>;
|
|
46
|
+
function pipeSideEffect<B, C, D, E, F, G, R>(
|
|
47
|
+
ab: ZeroFn<B>,
|
|
48
|
+
bc: UnaryFn<B, C>,
|
|
49
|
+
cd: UnaryFn<C, D>,
|
|
50
|
+
de: UnaryFn<D, E>,
|
|
51
|
+
ef: UnaryFn<E, F>,
|
|
52
|
+
fg: UnaryFn<F, G>,
|
|
53
|
+
gh: UnaryFn<G, R>
|
|
54
|
+
): () => MaybeSideEffect<R>;
|
|
55
|
+
function pipeSideEffect<B, C, D, E, F, G, H, R>(
|
|
56
|
+
ab: ZeroFn<B>,
|
|
57
|
+
bc: UnaryFn<B, C>,
|
|
58
|
+
cd: UnaryFn<C, D>,
|
|
59
|
+
de: UnaryFn<D, E>,
|
|
60
|
+
ef: UnaryFn<E, F>,
|
|
61
|
+
fg: UnaryFn<F, G>,
|
|
62
|
+
gh: UnaryFn<G, H>,
|
|
63
|
+
hi: UnaryFn<H, R>
|
|
64
|
+
): () => MaybeSideEffect<R>;
|
|
65
|
+
function pipeSideEffect<B, C, D, E, F, G, H, I, R>(
|
|
66
|
+
ab: ZeroFn<B>,
|
|
67
|
+
bc: UnaryFn<B, C>,
|
|
68
|
+
cd: UnaryFn<C, D>,
|
|
69
|
+
de: UnaryFn<D, E>,
|
|
70
|
+
ef: UnaryFn<E, F>,
|
|
71
|
+
fg: UnaryFn<F, G>,
|
|
72
|
+
gh: UnaryFn<G, H>,
|
|
73
|
+
hi: UnaryFn<H, I>,
|
|
74
|
+
ij: UnaryFn<I, R>
|
|
75
|
+
): () => MaybeSideEffect<R>;
|
|
76
|
+
function pipeSideEffect<B, C, D, E, F, G, H, I, J, R>(
|
|
77
|
+
ab: ZeroFn<B>,
|
|
78
|
+
bc: UnaryFn<B, C>,
|
|
79
|
+
cd: UnaryFn<C, D>,
|
|
80
|
+
de: UnaryFn<D, E>,
|
|
81
|
+
ef: UnaryFn<E, F>,
|
|
82
|
+
fg: UnaryFn<F, G>,
|
|
83
|
+
gh: UnaryFn<G, H>,
|
|
84
|
+
hi: UnaryFn<H, I>,
|
|
85
|
+
ij: UnaryFn<I, J>,
|
|
86
|
+
jk: UnaryFn<J, R>
|
|
87
|
+
): () => MaybeSideEffect<R>;
|
|
46
88
|
function pipeSideEffect<A, R>(ab: UnaryFn<A, R>): (a: A | SideEffect<any>) => MaybeSideEffect<R>;
|
|
47
89
|
function pipeSideEffect<A, B, R>(
|
|
48
90
|
ab: UnaryFn<A, B>,
|
|
@@ -74,6 +116,48 @@ function pipeSideEffect<A, B, C, D, E, F, R>(
|
|
|
74
116
|
ef: UnaryFn<E, F>,
|
|
75
117
|
fg: UnaryFn<F, R>
|
|
76
118
|
): (a: A | SideEffect<any>) => MaybeSideEffect<R>;
|
|
119
|
+
function pipeSideEffect<A, B, C, D, E, F, G, R>(
|
|
120
|
+
ab: UnaryFn<A, B>,
|
|
121
|
+
bc: UnaryFn<B, C>,
|
|
122
|
+
cd: UnaryFn<C, D>,
|
|
123
|
+
de: UnaryFn<D, E>,
|
|
124
|
+
ef: UnaryFn<E, F>,
|
|
125
|
+
fg: UnaryFn<F, G>,
|
|
126
|
+
gh: UnaryFn<G, R>
|
|
127
|
+
): (a: A | SideEffect<any>) => MaybeSideEffect<R>;
|
|
128
|
+
function pipeSideEffect<A, B, C, D, E, F, G, H, R>(
|
|
129
|
+
ab: UnaryFn<A, B>,
|
|
130
|
+
bc: UnaryFn<B, C>,
|
|
131
|
+
cd: UnaryFn<C, D>,
|
|
132
|
+
de: UnaryFn<D, E>,
|
|
133
|
+
ef: UnaryFn<E, F>,
|
|
134
|
+
fg: UnaryFn<F, G>,
|
|
135
|
+
gh: UnaryFn<G, H>,
|
|
136
|
+
hi: UnaryFn<H, R>
|
|
137
|
+
): (a: A | SideEffect<any>) => MaybeSideEffect<R>;
|
|
138
|
+
function pipeSideEffect<A, B, C, D, E, F, G, H, I, R>(
|
|
139
|
+
ab: UnaryFn<A, B>,
|
|
140
|
+
bc: UnaryFn<B, C>,
|
|
141
|
+
cd: UnaryFn<C, D>,
|
|
142
|
+
de: UnaryFn<D, E>,
|
|
143
|
+
ef: UnaryFn<E, F>,
|
|
144
|
+
fg: UnaryFn<F, G>,
|
|
145
|
+
gh: UnaryFn<G, H>,
|
|
146
|
+
hi: UnaryFn<H, I>,
|
|
147
|
+
ij: UnaryFn<I, R>
|
|
148
|
+
): (a: A | SideEffect<any>) => MaybeSideEffect<R>;
|
|
149
|
+
function pipeSideEffect<A, B, C, D, E, F, G, H, I, J, R>(
|
|
150
|
+
ab: UnaryFn<A, B>,
|
|
151
|
+
bc: UnaryFn<B, C>,
|
|
152
|
+
cd: UnaryFn<C, D>,
|
|
153
|
+
de: UnaryFn<D, E>,
|
|
154
|
+
ef: UnaryFn<E, F>,
|
|
155
|
+
fg: UnaryFn<F, G>,
|
|
156
|
+
gh: UnaryFn<G, H>,
|
|
157
|
+
hi: UnaryFn<H, I>,
|
|
158
|
+
ij: UnaryFn<I, J>,
|
|
159
|
+
jk: UnaryFn<J, R>
|
|
160
|
+
): (a: A | SideEffect<any>) => MaybeSideEffect<R>;
|
|
77
161
|
|
|
78
162
|
function pipeSideEffect<Fns extends [UnaryFn<any, any>, ...UnaryFn<any, any>[]]>(...funcs: Fns): PipeSideEffect<Fns>;
|
|
79
163
|
function pipeSideEffect(...funcs: Array<UnaryFn<any, any>>): (input: any) => any;
|