Skip to content

Commit f16a15f

Browse files
committed
refactor: split module into multiple files
1 parent 2ea9e18 commit f16a15f

File tree

13 files changed

+994
-978
lines changed

13 files changed

+994
-978
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# These are supported funding model platforms
22

3-
github: [lambdalisue] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3+
github: [
4+
lambdalisue,
5+
] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
46
patreon: # Replace with a single Patreon username
57
open_collective: # Replace with a single Open Collective username
68
ko_fi: # Replace with a single Ko-fi username

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ inference and type checking of the operator functions.
2121
Pipe a value through a series of operator functions.
2222

2323
```ts
24-
import { pipe } from "@core/pipe";
24+
import { pipe } from "@core/pipe/pipe";
2525

2626
const result = pipe(
2727
1,
@@ -36,7 +36,7 @@ Or use `async` module to pipe a value through a series of asynchronous operator
3636
functions.
3737

3838
```ts
39-
import { pipe } from "@core/pipe/async";
39+
import { pipe } from "@core/pipe/async/pipe";
4040

4141
const result = pipe(
4242
1,

_common.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Operator } from "./operator.ts";
2+
3+
/**
4+
* @internal
5+
*/
6+
export type LastOperatorReturn<T extends Operator<unknown, unknown>[]> =
7+
T extends [...Operator<unknown, unknown>[], Operator<unknown, infer R>] ? R
8+
: never;

async/_common.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { AsyncOperator } from "./operator.ts";
2+
3+
/**
4+
* @internal
5+
*/
6+
export type LastAsyncOperatorReturn<
7+
T extends AsyncOperator<unknown, unknown>[],
8+
> = T extends
9+
[...AsyncOperator<unknown, unknown>[], AsyncOperator<unknown, infer R>] ? R
10+
: never;

0 commit comments

Comments
 (0)