UNPKG

7.99 kBTypeScriptView Raw
1import { Gulp, TaskFunction } from "gulp";
2
3declare namespace seq {
4 type Step = string | string[];
5
6 type Done = (error?: any) => void;
7
8 function use(gulp: Gulp): typeof seq;
9}
10
11/*
12Sequence functions (apart from the one returning TaskFunction) generated using the following (requires lodash for the padding):
13
14const fnBase = `declare function seq(`;
15const argPad = _.pad('', fnBase.length, ' ');
16const maxArgs = 25;
17
18const outDone = [];
19
20for (let i = 1; i <= maxArgs; i++) {
21 let def = [];
22 for (let j = 1; j <= i; j++) {
23 def.push(`s${j}: seq.Step`);
24 }
25
26 def.push(`done: seq.Done): void;`);
27 outDone.push(def.join(`,\n${argPad}`));
28}
29
30console.log(fnBase + outDone.join(`\n${fnBase}`));
31*/
32
33declare function seq(firstTask: seq.Step, ...additionalTasks: seq.Step[]): TaskFunction;
34
35declare function seq(s1: seq.Step, done: seq.Done): void;
36declare function seq(s1: seq.Step, s2: seq.Step, done: seq.Done): void;
37declare function seq(s1: seq.Step, s2: seq.Step, s3: seq.Step, done: seq.Done): void;
38declare function seq(s1: seq.Step, s2: seq.Step, s3: seq.Step, s4: seq.Step, done: seq.Done): void;
39declare function seq(s1: seq.Step, s2: seq.Step, s3: seq.Step, s4: seq.Step, s5: seq.Step, done: seq.Done): void;
40declare function seq(
41 s1: seq.Step,
42 s2: seq.Step,
43 s3: seq.Step,
44 s4: seq.Step,
45 s5: seq.Step,
46 s6: seq.Step,
47 done: seq.Done,
48): void;
49declare function seq(
50 s1: seq.Step,
51 s2: seq.Step,
52 s3: seq.Step,
53 s4: seq.Step,
54 s5: seq.Step,
55 s6: seq.Step,
56 s7: seq.Step,
57 done: seq.Done,
58): void;
59declare function seq(
60 s1: seq.Step,
61 s2: seq.Step,
62 s3: seq.Step,
63 s4: seq.Step,
64 s5: seq.Step,
65 s6: seq.Step,
66 s7: seq.Step,
67 s8: seq.Step,
68 done: seq.Done,
69): void;
70declare function seq(
71 s1: seq.Step,
72 s2: seq.Step,
73 s3: seq.Step,
74 s4: seq.Step,
75 s5: seq.Step,
76 s6: seq.Step,
77 s7: seq.Step,
78 s8: seq.Step,
79 s9: seq.Step,
80 done: seq.Done,
81): void;
82declare function seq(
83 s1: seq.Step,
84 s2: seq.Step,
85 s3: seq.Step,
86 s4: seq.Step,
87 s5: seq.Step,
88 s6: seq.Step,
89 s7: seq.Step,
90 s8: seq.Step,
91 s9: seq.Step,
92 s10: seq.Step,
93 done: seq.Done,
94): void;
95declare function seq(
96 s1: seq.Step,
97 s2: seq.Step,
98 s3: seq.Step,
99 s4: seq.Step,
100 s5: seq.Step,
101 s6: seq.Step,
102 s7: seq.Step,
103 s8: seq.Step,
104 s9: seq.Step,
105 s10: seq.Step,
106 s11: seq.Step,
107 done: seq.Done,
108): void;
109declare function seq(
110 s1: seq.Step,
111 s2: seq.Step,
112 s3: seq.Step,
113 s4: seq.Step,
114 s5: seq.Step,
115 s6: seq.Step,
116 s7: seq.Step,
117 s8: seq.Step,
118 s9: seq.Step,
119 s10: seq.Step,
120 s11: seq.Step,
121 s12: seq.Step,
122 done: seq.Done,
123): void;
124declare function seq(
125 s1: seq.Step,
126 s2: seq.Step,
127 s3: seq.Step,
128 s4: seq.Step,
129 s5: seq.Step,
130 s6: seq.Step,
131 s7: seq.Step,
132 s8: seq.Step,
133 s9: seq.Step,
134 s10: seq.Step,
135 s11: seq.Step,
136 s12: seq.Step,
137 s13: seq.Step,
138 done: seq.Done,
139): void;
140declare function seq(
141 s1: seq.Step,
142 s2: seq.Step,
143 s3: seq.Step,
144 s4: seq.Step,
145 s5: seq.Step,
146 s6: seq.Step,
147 s7: seq.Step,
148 s8: seq.Step,
149 s9: seq.Step,
150 s10: seq.Step,
151 s11: seq.Step,
152 s12: seq.Step,
153 s13: seq.Step,
154 s14: seq.Step,
155 done: seq.Done,
156): void;
157declare function seq(
158 s1: seq.Step,
159 s2: seq.Step,
160 s3: seq.Step,
161 s4: seq.Step,
162 s5: seq.Step,
163 s6: seq.Step,
164 s7: seq.Step,
165 s8: seq.Step,
166 s9: seq.Step,
167 s10: seq.Step,
168 s11: seq.Step,
169 s12: seq.Step,
170 s13: seq.Step,
171 s14: seq.Step,
172 s15: seq.Step,
173 done: seq.Done,
174): void;
175declare function seq(
176 s1: seq.Step,
177 s2: seq.Step,
178 s3: seq.Step,
179 s4: seq.Step,
180 s5: seq.Step,
181 s6: seq.Step,
182 s7: seq.Step,
183 s8: seq.Step,
184 s9: seq.Step,
185 s10: seq.Step,
186 s11: seq.Step,
187 s12: seq.Step,
188 s13: seq.Step,
189 s14: seq.Step,
190 s15: seq.Step,
191 s16: seq.Step,
192 done: seq.Done,
193): void;
194declare function seq(
195 s1: seq.Step,
196 s2: seq.Step,
197 s3: seq.Step,
198 s4: seq.Step,
199 s5: seq.Step,
200 s6: seq.Step,
201 s7: seq.Step,
202 s8: seq.Step,
203 s9: seq.Step,
204 s10: seq.Step,
205 s11: seq.Step,
206 s12: seq.Step,
207 s13: seq.Step,
208 s14: seq.Step,
209 s15: seq.Step,
210 s16: seq.Step,
211 s17: seq.Step,
212 done: seq.Done,
213): void;
214declare function seq(
215 s1: seq.Step,
216 s2: seq.Step,
217 s3: seq.Step,
218 s4: seq.Step,
219 s5: seq.Step,
220 s6: seq.Step,
221 s7: seq.Step,
222 s8: seq.Step,
223 s9: seq.Step,
224 s10: seq.Step,
225 s11: seq.Step,
226 s12: seq.Step,
227 s13: seq.Step,
228 s14: seq.Step,
229 s15: seq.Step,
230 s16: seq.Step,
231 s17: seq.Step,
232 s18: seq.Step,
233 done: seq.Done,
234): void;
235declare function seq(
236 s1: seq.Step,
237 s2: seq.Step,
238 s3: seq.Step,
239 s4: seq.Step,
240 s5: seq.Step,
241 s6: seq.Step,
242 s7: seq.Step,
243 s8: seq.Step,
244 s9: seq.Step,
245 s10: seq.Step,
246 s11: seq.Step,
247 s12: seq.Step,
248 s13: seq.Step,
249 s14: seq.Step,
250 s15: seq.Step,
251 s16: seq.Step,
252 s17: seq.Step,
253 s18: seq.Step,
254 s19: seq.Step,
255 done: seq.Done,
256): void;
257declare function seq(
258 s1: seq.Step,
259 s2: seq.Step,
260 s3: seq.Step,
261 s4: seq.Step,
262 s5: seq.Step,
263 s6: seq.Step,
264 s7: seq.Step,
265 s8: seq.Step,
266 s9: seq.Step,
267 s10: seq.Step,
268 s11: seq.Step,
269 s12: seq.Step,
270 s13: seq.Step,
271 s14: seq.Step,
272 s15: seq.Step,
273 s16: seq.Step,
274 s17: seq.Step,
275 s18: seq.Step,
276 s19: seq.Step,
277 s20: seq.Step,
278 done: seq.Done,
279): void;
280declare function seq(
281 s1: seq.Step,
282 s2: seq.Step,
283 s3: seq.Step,
284 s4: seq.Step,
285 s5: seq.Step,
286 s6: seq.Step,
287 s7: seq.Step,
288 s8: seq.Step,
289 s9: seq.Step,
290 s10: seq.Step,
291 s11: seq.Step,
292 s12: seq.Step,
293 s13: seq.Step,
294 s14: seq.Step,
295 s15: seq.Step,
296 s16: seq.Step,
297 s17: seq.Step,
298 s18: seq.Step,
299 s19: seq.Step,
300 s20: seq.Step,
301 s21: seq.Step,
302 done: seq.Done,
303): void;
304declare function seq(
305 s1: seq.Step,
306 s2: seq.Step,
307 s3: seq.Step,
308 s4: seq.Step,
309 s5: seq.Step,
310 s6: seq.Step,
311 s7: seq.Step,
312 s8: seq.Step,
313 s9: seq.Step,
314 s10: seq.Step,
315 s11: seq.Step,
316 s12: seq.Step,
317 s13: seq.Step,
318 s14: seq.Step,
319 s15: seq.Step,
320 s16: seq.Step,
321 s17: seq.Step,
322 s18: seq.Step,
323 s19: seq.Step,
324 s20: seq.Step,
325 s21: seq.Step,
326 s22: seq.Step,
327 done: seq.Done,
328): void;
329declare function seq(
330 s1: seq.Step,
331 s2: seq.Step,
332 s3: seq.Step,
333 s4: seq.Step,
334 s5: seq.Step,
335 s6: seq.Step,
336 s7: seq.Step,
337 s8: seq.Step,
338 s9: seq.Step,
339 s10: seq.Step,
340 s11: seq.Step,
341 s12: seq.Step,
342 s13: seq.Step,
343 s14: seq.Step,
344 s15: seq.Step,
345 s16: seq.Step,
346 s17: seq.Step,
347 s18: seq.Step,
348 s19: seq.Step,
349 s20: seq.Step,
350 s21: seq.Step,
351 s22: seq.Step,
352 s23: seq.Step,
353 done: seq.Done,
354): void;
355declare function seq(
356 s1: seq.Step,
357 s2: seq.Step,
358 s3: seq.Step,
359 s4: seq.Step,
360 s5: seq.Step,
361 s6: seq.Step,
362 s7: seq.Step,
363 s8: seq.Step,
364 s9: seq.Step,
365 s10: seq.Step,
366 s11: seq.Step,
367 s12: seq.Step,
368 s13: seq.Step,
369 s14: seq.Step,
370 s15: seq.Step,
371 s16: seq.Step,
372 s17: seq.Step,
373 s18: seq.Step,
374 s19: seq.Step,
375 s20: seq.Step,
376 s21: seq.Step,
377 s22: seq.Step,
378 s23: seq.Step,
379 s24: seq.Step,
380 done: seq.Done,
381): void;
382declare function seq(
383 s1: seq.Step,
384 s2: seq.Step,
385 s3: seq.Step,
386 s4: seq.Step,
387 s5: seq.Step,
388 s6: seq.Step,
389 s7: seq.Step,
390 s8: seq.Step,
391 s9: seq.Step,
392 s10: seq.Step,
393 s11: seq.Step,
394 s12: seq.Step,
395 s13: seq.Step,
396 s14: seq.Step,
397 s15: seq.Step,
398 s16: seq.Step,
399 s17: seq.Step,
400 s18: seq.Step,
401 s19: seq.Step,
402 s20: seq.Step,
403 s21: seq.Step,
404 s22: seq.Step,
405 s23: seq.Step,
406 s24: seq.Step,
407 s25: seq.Step,
408 done: seq.Done,
409): void;
410
411export = seq;