|
1 | 1 | import * as Test from "../src/types/Test"; |
2 | | -import { each, pipe, toAsync } from "../src"; |
| 2 | +import { each, pipe, take, toAsync } from "../src"; |
3 | 3 |
|
4 | 4 | const { checks, check } = Test; |
5 | 5 |
|
6 | 6 | const res1 = each(console.log, [1, 2, 3]); |
7 | 7 | const res2 = pipe([1, 2, 3], each(console.log)); |
8 | | -const res3 = pipe([1, 2, 3], toAsync, each(console.log)); |
| 8 | +const res3 = pipe([1, 2, 3], take(1), each(console.log)); |
| 9 | +const res4 = pipe([1, 2, 3], toAsync, each(console.log)); |
9 | 10 |
|
10 | 11 | checks([ |
11 | 12 | check<typeof res1, void, Test.Pass>(), |
12 | 13 | check<typeof res2, void, Test.Pass>(), |
13 | | - check<typeof res3, Promise<void>, Test.Pass>(), |
| 14 | + check<typeof res3, void, Test.Pass>(), |
| 15 | + check<typeof res4, Promise<void>, Test.Pass>(), |
14 | 16 | ]); |
0 commit comments