@barnum/barnum 0.2.3 → 0.3.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/artifacts/linux-arm64/barnum +0 -0
- package/artifacts/linux-x64/barnum +0 -0
- package/artifacts/macos-arm64/barnum +0 -0
- package/artifacts/macos-x64/barnum +0 -0
- package/artifacts/win-x64/barnum.exe +0 -0
- package/cli.cjs +33 -0
- package/dist/all.d.ts +12 -0
- package/dist/all.js +8 -0
- package/dist/ast.d.ts +375 -0
- package/dist/ast.js +381 -0
- package/dist/bind.d.ts +62 -0
- package/dist/bind.js +106 -0
- package/dist/builtins.d.ts +257 -0
- package/dist/builtins.js +600 -0
- package/dist/chain.d.ts +2 -0
- package/dist/chain.js +8 -0
- package/dist/effect-id.d.ts +14 -0
- package/dist/effect-id.js +16 -0
- package/dist/handler.d.ts +50 -0
- package/dist/handler.js +146 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5 -0
- package/dist/pipe.d.ts +11 -0
- package/dist/pipe.js +11 -0
- package/dist/race.d.ts +53 -0
- package/dist/race.js +141 -0
- package/dist/recursive.d.ts +34 -0
- package/dist/recursive.js +53 -0
- package/dist/run.d.ts +7 -0
- package/dist/run.js +143 -0
- package/dist/schema.d.ts +8 -0
- package/dist/schema.js +95 -0
- package/dist/try-catch.d.ts +23 -0
- package/dist/try-catch.js +36 -0
- package/dist/worker.d.ts +11 -0
- package/dist/worker.js +46 -0
- package/package.json +40 -16
- package/src/all.ts +89 -0
- package/src/ast.ts +878 -0
- package/src/bind.ts +192 -0
- package/src/builtins.ts +804 -0
- package/src/chain.ts +17 -0
- package/src/effect-id.ts +30 -0
- package/src/handler.ts +279 -0
- package/src/index.ts +30 -0
- package/src/pipe.ts +93 -0
- package/src/race.ts +183 -0
- package/src/recursive.ts +112 -0
- package/src/run.ts +181 -0
- package/src/schema.ts +118 -0
- package/src/try-catch.ts +53 -0
- package/src/worker.ts +56 -0
- package/README.md +0 -19
- package/barnum-config-schema.json +0 -408
- package/cli.js +0 -20
- package/index.js +0 -23
package/dist/schema.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { toJSONSchema } from "zod";
|
|
2
|
+
// Zod v4 schema def types that have child schemas.
|
|
3
|
+
// Verified against Zod 4.3.6 internals — every compound type's def
|
|
4
|
+
// shape and child property name is listed here.
|
|
5
|
+
const CHILD_ACCESSORS = {
|
|
6
|
+
object: (def) => Object.values(def.shape),
|
|
7
|
+
array: (def) => [def.element],
|
|
8
|
+
tuple: (def) => [...def.items, ...(def.rest ? [def.rest] : [])],
|
|
9
|
+
union: (def) => def.options,
|
|
10
|
+
intersection: (def) => [def.left, def.right],
|
|
11
|
+
record: (def) => [def.keyType, def.valueType],
|
|
12
|
+
// Wrappers with a single inner type
|
|
13
|
+
nullable: (def) => [def.innerType],
|
|
14
|
+
optional: (def) => [def.innerType],
|
|
15
|
+
nonoptional: (def) => [def.innerType],
|
|
16
|
+
default: (def) => [def.innerType],
|
|
17
|
+
catch: (def) => [def.innerType],
|
|
18
|
+
readonly: (def) => [def.innerType],
|
|
19
|
+
promise: (def) => [def.innerType],
|
|
20
|
+
// Pipe has two children
|
|
21
|
+
pipe: (def) => [def.in, def.out],
|
|
22
|
+
// Lazy resolves to inner schema
|
|
23
|
+
lazy: (def) => [def.getter()],
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Walk the Zod schema tree and reject patterns that `toJSONSchema()`
|
|
27
|
+
* handles incorrectly or silently drops:
|
|
28
|
+
*
|
|
29
|
+
* - `z.intersection()` — produces `allOf` with `additionalProperties: false`
|
|
30
|
+
* on both sides (from `io: "output"`), making the intersection unmatchable
|
|
31
|
+
* on Draft 7.
|
|
32
|
+
*
|
|
33
|
+
* - `.refine()` / `.superRefine()` — silently stripped from JSON Schema
|
|
34
|
+
* output, so the Rust side would accept values that fail the refinement.
|
|
35
|
+
* Detected by checking for custom checks (`check._zod.def.check === "custom"`)
|
|
36
|
+
* in the schema's checks array.
|
|
37
|
+
*/
|
|
38
|
+
function assertNoUnsupportedPatterns(schema, label, visited = new WeakSet()) {
|
|
39
|
+
if (visited.has(schema)) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
visited.add(schema);
|
|
43
|
+
const def = schema._zod.def;
|
|
44
|
+
// Reject intersections
|
|
45
|
+
if (def.type === "intersection") {
|
|
46
|
+
throw new Error(`Handler "${label}": z.intersection() is not supported. ` +
|
|
47
|
+
`It produces broken JSON Schema on Draft 7 because both sides ` +
|
|
48
|
+
`get additionalProperties: false. Use z.object().extend() or ` +
|
|
49
|
+
`z.object().merge() instead.`);
|
|
50
|
+
}
|
|
51
|
+
// Reject custom checks (from .refine() and .superRefine())
|
|
52
|
+
const checks = def.checks;
|
|
53
|
+
if (checks) {
|
|
54
|
+
for (const check of checks) {
|
|
55
|
+
if (check._zod.def.check === "custom") {
|
|
56
|
+
throw new Error(`Handler "${label}": .refine() and .superRefine() are not ` +
|
|
57
|
+
`supported. Custom validations cannot be expressed in JSON ` +
|
|
58
|
+
`Schema and would be silently dropped.`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Recurse into children
|
|
63
|
+
const getChildren = CHILD_ACCESSORS[def.type];
|
|
64
|
+
if (getChildren) {
|
|
65
|
+
for (const child of getChildren(def)) {
|
|
66
|
+
assertNoUnsupportedPatterns(child, label, visited);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Convert a Zod schema to a JSON Schema document suitable for embedding
|
|
72
|
+
* in the serialized AST. Throws if the schema contains types that can't
|
|
73
|
+
* survive the TS → JSON → Rust boundary.
|
|
74
|
+
*/
|
|
75
|
+
export function zodToCheckedJsonSchema(schema, label) {
|
|
76
|
+
// Pre-validate: catch patterns that toJSONSchema() handles incorrectly
|
|
77
|
+
assertNoUnsupportedPatterns(schema, label);
|
|
78
|
+
let raw;
|
|
79
|
+
try {
|
|
80
|
+
raw = toJSONSchema(schema, {
|
|
81
|
+
target: "draft-07",
|
|
82
|
+
unrepresentable: "throw",
|
|
83
|
+
io: "output",
|
|
84
|
+
cycles: "throw",
|
|
85
|
+
reused: "inline",
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
90
|
+
throw new Error(`Handler "${label}": Zod schema cannot be converted to JSON Schema: ${message}`, { cause: error });
|
|
91
|
+
}
|
|
92
|
+
// Strip $schema — embedded schemas don't need the draft URI.
|
|
93
|
+
const { $schema: _, ...rest } = raw;
|
|
94
|
+
return rest;
|
|
95
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Pipeable, type TypedAction } from "./ast.js";
|
|
2
|
+
/**
|
|
3
|
+
* HOAS combinator for type-level error handling. The body callback receives
|
|
4
|
+
* a `throwError` token — a `TypedAction<TError, never>` that, when placed
|
|
5
|
+
* in the pipeline, tags the error as Break, performs to the handler, which
|
|
6
|
+
* restarts the body. The body-level Branch routes to the recovery arm.
|
|
7
|
+
*
|
|
8
|
+
* This handles **type-level errors only** — values returned by handlers via
|
|
9
|
+
* the `Result` type. If a handler panics, throws a JavaScript exception, or
|
|
10
|
+
* the runtime crashes, the existing error propagation path handles it.
|
|
11
|
+
* tryCatch does not catch those. Analogous to Rust's `Result` vs `panic!`.
|
|
12
|
+
*
|
|
13
|
+
* Compiled form (restart+Branch, same substrate as loop/earlyReturn):
|
|
14
|
+
* `Chain(Tag("Continue"),`
|
|
15
|
+
* `RestartHandle(id, ExtractIndex(0),`
|
|
16
|
+
* `Branch({ Continue: body, Break: recovery })))`
|
|
17
|
+
*
|
|
18
|
+
* throwError = `Chain(Tag("Break"), RestartPerform(id))`
|
|
19
|
+
*
|
|
20
|
+
* When throwError fires: error tagged Break → `RestartPerform` → handler extracts
|
|
21
|
+
* payload → body restarts → Branch takes Break arm → recovery receives error.
|
|
22
|
+
*/
|
|
23
|
+
export declare function tryCatch<TIn, TOut, TError>(body: (throwError: TypedAction<TError, never>) => Pipeable<TIn, TOut>, recovery: Pipeable<TError, TOut>): TypedAction<TIn, TOut>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { typedAction, buildRestartBranchAction, TAG_BREAK, } from "./ast.js";
|
|
2
|
+
import { allocateRestartHandlerId } from "./effect-id.js";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// tryCatch — type-level error handling via restart+Branch
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* HOAS combinator for type-level error handling. The body callback receives
|
|
8
|
+
* a `throwError` token — a `TypedAction<TError, never>` that, when placed
|
|
9
|
+
* in the pipeline, tags the error as Break, performs to the handler, which
|
|
10
|
+
* restarts the body. The body-level Branch routes to the recovery arm.
|
|
11
|
+
*
|
|
12
|
+
* This handles **type-level errors only** — values returned by handlers via
|
|
13
|
+
* the `Result` type. If a handler panics, throws a JavaScript exception, or
|
|
14
|
+
* the runtime crashes, the existing error propagation path handles it.
|
|
15
|
+
* tryCatch does not catch those. Analogous to Rust's `Result` vs `panic!`.
|
|
16
|
+
*
|
|
17
|
+
* Compiled form (restart+Branch, same substrate as loop/earlyReturn):
|
|
18
|
+
* `Chain(Tag("Continue"),`
|
|
19
|
+
* `RestartHandle(id, ExtractIndex(0),`
|
|
20
|
+
* `Branch({ Continue: body, Break: recovery })))`
|
|
21
|
+
*
|
|
22
|
+
* throwError = `Chain(Tag("Break"), RestartPerform(id))`
|
|
23
|
+
*
|
|
24
|
+
* When throwError fires: error tagged Break → `RestartPerform` → handler extracts
|
|
25
|
+
* payload → body restarts → Branch takes Break arm → recovery receives error.
|
|
26
|
+
*/
|
|
27
|
+
export function tryCatch(body, recovery) {
|
|
28
|
+
const restartHandlerId = allocateRestartHandlerId();
|
|
29
|
+
const throwError = typedAction({
|
|
30
|
+
kind: "Chain",
|
|
31
|
+
first: TAG_BREAK,
|
|
32
|
+
rest: { kind: "RestartPerform", restart_handler_id: restartHandlerId },
|
|
33
|
+
});
|
|
34
|
+
const bodyAction = body(throwError);
|
|
35
|
+
return typedAction(buildRestartBranchAction(restartHandlerId, bodyAction, recovery));
|
|
36
|
+
}
|
package/dist/worker.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker script: invoked as `tsx worker.ts <module> <export>`.
|
|
3
|
+
*
|
|
4
|
+
* Protocol:
|
|
5
|
+
* Rust → stdin: JSON `{ "value": <any> }`
|
|
6
|
+
* stdout → Rust: JSON result (handler return value)
|
|
7
|
+
*
|
|
8
|
+
* If the handler throws or the module/export can't be resolved, the
|
|
9
|
+
* process exits non-zero. Rust interprets that as a fatal workflow error.
|
|
10
|
+
*/
|
|
11
|
+
declare function main(): Promise<void>;
|
package/dist/worker.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Worker script: invoked as `tsx worker.ts <module> <export>`.
|
|
4
|
+
*
|
|
5
|
+
* Protocol:
|
|
6
|
+
* Rust → stdin: JSON `{ "value": <any> }`
|
|
7
|
+
* stdout → Rust: JSON result (handler return value)
|
|
8
|
+
*
|
|
9
|
+
* If the handler throws or the module/export can't be resolved, the
|
|
10
|
+
* process exits non-zero. Rust interprets that as a fatal workflow error.
|
|
11
|
+
*/
|
|
12
|
+
// Suppress EPIPE — when the Rust binary exits (e.g., a race was resolved),
|
|
13
|
+
// orphan workers get broken pipe on stdout. This is expected, not an error.
|
|
14
|
+
process.stdout.on("error", (error) => {
|
|
15
|
+
if (error.code === "EPIPE") {
|
|
16
|
+
process.exit(0);
|
|
17
|
+
}
|
|
18
|
+
throw error;
|
|
19
|
+
});
|
|
20
|
+
async function main() {
|
|
21
|
+
const [modulePath, exportName = "default"] = process.argv.slice(2);
|
|
22
|
+
if (!modulePath) {
|
|
23
|
+
process.stderr.write("worker: missing module path argument\n");
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
// Read entire stdin
|
|
27
|
+
const chunks = [];
|
|
28
|
+
for await (const chunk of process.stdin) {
|
|
29
|
+
chunks.push(chunk);
|
|
30
|
+
}
|
|
31
|
+
const input = JSON.parse(Buffer.concat(chunks).toString());
|
|
32
|
+
// Import handler, call it
|
|
33
|
+
const mod = await import(modulePath);
|
|
34
|
+
const handler = mod[exportName];
|
|
35
|
+
if (!handler?.__definition?.handle) {
|
|
36
|
+
process.stderr.write(`worker: ${modulePath}:${exportName} is not a barnum handler\n`);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
const result = await handler.__definition.handle({ value: input.value });
|
|
40
|
+
// Write result to stdout
|
|
41
|
+
process.stdout.write(JSON.stringify(result) ?? "null");
|
|
42
|
+
}
|
|
43
|
+
main().catch((error) => {
|
|
44
|
+
process.stderr.write(`worker: ${error}\n`);
|
|
45
|
+
process.exit(1);
|
|
46
|
+
});
|
package/package.json
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barnum/barnum",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Barnum
|
|
5
|
-
"
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Barnum workflow engine",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./dist/*": "./dist/*",
|
|
14
|
+
"./src/*": "./src/*",
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
6
17
|
"bin": {
|
|
7
|
-
"barnum": "cli.
|
|
18
|
+
"barnum": "cli.cjs"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepack": "tsc -p tsconfig.build.json",
|
|
22
|
+
"build": "tsc -p tsconfig.build.json",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"typecheck": "tsc --noEmit",
|
|
25
|
+
"lint": "oxlint src/ tests/"
|
|
8
26
|
},
|
|
9
27
|
"author": "Robert Balicki",
|
|
10
28
|
"license": "MIT",
|
|
@@ -16,18 +34,24 @@
|
|
|
16
34
|
"access": "public",
|
|
17
35
|
"registry": "https://registry.npmjs.org"
|
|
18
36
|
},
|
|
19
|
-
"keywords": [
|
|
20
|
-
"barnum",
|
|
21
|
-
"ai",
|
|
22
|
-
"agents",
|
|
23
|
-
"automation",
|
|
24
|
-
"cli"
|
|
25
|
-
],
|
|
26
37
|
"files": [
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
38
|
+
"dist/**/*",
|
|
39
|
+
"src/**/*.ts",
|
|
40
|
+
"cli.cjs",
|
|
41
|
+
"artifacts/**/*"
|
|
31
42
|
],
|
|
32
|
-
"sideEffects": false
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@oxlint/binding-darwin-arm64": "^1.57.0",
|
|
46
|
+
"@types/json-schema": "^7.0.15",
|
|
47
|
+
"@types/node": "^25.5.0",
|
|
48
|
+
"oxlint": "^1.57.0",
|
|
49
|
+
"prettier": "^3.8.1",
|
|
50
|
+
"tsx": "^4.21.0",
|
|
51
|
+
"typescript": "^5.7.0",
|
|
52
|
+
"vitest": "^3.0.0"
|
|
53
|
+
},
|
|
54
|
+
"dependencies": {
|
|
55
|
+
"zod": "^4.3.6"
|
|
56
|
+
}
|
|
33
57
|
}
|
package/src/all.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type Action,
|
|
3
|
+
type Pipeable,
|
|
4
|
+
type TypedAction,
|
|
5
|
+
typedAction,
|
|
6
|
+
} from "./ast.js";
|
|
7
|
+
import { constant } from "./builtins.js";
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
export function all(): TypedAction<any, []>;
|
|
11
|
+
export function all<In, O1>(a1: Pipeable<In, O1>): TypedAction<In, [O1]>;
|
|
12
|
+
export function all<In, O1, O2>(
|
|
13
|
+
a1: Pipeable<In, O1>,
|
|
14
|
+
a2: Pipeable<In, O2>,
|
|
15
|
+
): TypedAction<In, [O1, O2]>;
|
|
16
|
+
export function all<In, O1, O2, O3>(
|
|
17
|
+
a1: Pipeable<In, O1>,
|
|
18
|
+
a2: Pipeable<In, O2>,
|
|
19
|
+
a3: Pipeable<In, O3>,
|
|
20
|
+
): TypedAction<In, [O1, O2, O3]>;
|
|
21
|
+
export function all<In, O1, O2, O3, O4>(
|
|
22
|
+
a1: Pipeable<In, O1>,
|
|
23
|
+
a2: Pipeable<In, O2>,
|
|
24
|
+
a3: Pipeable<In, O3>,
|
|
25
|
+
a4: Pipeable<In, O4>,
|
|
26
|
+
): TypedAction<In, [O1, O2, O3, O4]>;
|
|
27
|
+
export function all<In, O1, O2, O3, O4, O5>(
|
|
28
|
+
a1: Pipeable<In, O1>,
|
|
29
|
+
a2: Pipeable<In, O2>,
|
|
30
|
+
a3: Pipeable<In, O3>,
|
|
31
|
+
a4: Pipeable<In, O4>,
|
|
32
|
+
a5: Pipeable<In, O5>,
|
|
33
|
+
): TypedAction<In, [O1, O2, O3, O4, O5]>;
|
|
34
|
+
export function all<In, O1, O2, O3, O4, O5, O6>(
|
|
35
|
+
a1: Pipeable<In, O1>,
|
|
36
|
+
a2: Pipeable<In, O2>,
|
|
37
|
+
a3: Pipeable<In, O3>,
|
|
38
|
+
a4: Pipeable<In, O4>,
|
|
39
|
+
a5: Pipeable<In, O5>,
|
|
40
|
+
a6: Pipeable<In, O6>,
|
|
41
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6]>;
|
|
42
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7>(
|
|
43
|
+
a1: Pipeable<In, O1>,
|
|
44
|
+
a2: Pipeable<In, O2>,
|
|
45
|
+
a3: Pipeable<In, O3>,
|
|
46
|
+
a4: Pipeable<In, O4>,
|
|
47
|
+
a5: Pipeable<In, O5>,
|
|
48
|
+
a6: Pipeable<In, O6>,
|
|
49
|
+
a7: Pipeable<In, O7>,
|
|
50
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7]>;
|
|
51
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7, O8>(
|
|
52
|
+
a1: Pipeable<In, O1>,
|
|
53
|
+
a2: Pipeable<In, O2>,
|
|
54
|
+
a3: Pipeable<In, O3>,
|
|
55
|
+
a4: Pipeable<In, O4>,
|
|
56
|
+
a5: Pipeable<In, O5>,
|
|
57
|
+
a6: Pipeable<In, O6>,
|
|
58
|
+
a7: Pipeable<In, O7>,
|
|
59
|
+
a8: Pipeable<In, O8>,
|
|
60
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7, O8]>;
|
|
61
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7, O8, O9>(
|
|
62
|
+
a1: Pipeable<In, O1>,
|
|
63
|
+
a2: Pipeable<In, O2>,
|
|
64
|
+
a3: Pipeable<In, O3>,
|
|
65
|
+
a4: Pipeable<In, O4>,
|
|
66
|
+
a5: Pipeable<In, O5>,
|
|
67
|
+
a6: Pipeable<In, O6>,
|
|
68
|
+
a7: Pipeable<In, O7>,
|
|
69
|
+
a8: Pipeable<In, O8>,
|
|
70
|
+
a9: Pipeable<In, O9>,
|
|
71
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7, O8, O9]>;
|
|
72
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10>(
|
|
73
|
+
a1: Pipeable<In, O1>,
|
|
74
|
+
a2: Pipeable<In, O2>,
|
|
75
|
+
a3: Pipeable<In, O3>,
|
|
76
|
+
a4: Pipeable<In, O4>,
|
|
77
|
+
a5: Pipeable<In, O5>,
|
|
78
|
+
a6: Pipeable<In, O6>,
|
|
79
|
+
a7: Pipeable<In, O7>,
|
|
80
|
+
a8: Pipeable<In, O8>,
|
|
81
|
+
a9: Pipeable<In, O9>,
|
|
82
|
+
a10: Pipeable<In, O10>,
|
|
83
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7, O8, O9, O10]>;
|
|
84
|
+
export function all(...actions: Action[]): Action {
|
|
85
|
+
if (actions.length === 0) {
|
|
86
|
+
return constant([]);
|
|
87
|
+
}
|
|
88
|
+
return typedAction({ kind: "All", actions });
|
|
89
|
+
}
|