@effect-app/vue 2.52.5 → 2.52.7
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/CHANGELOG.md +12 -0
- package/dist/experimental/commander.d.ts +79 -58
- package/dist/experimental/commander.d.ts.map +1 -1
- package/dist/experimental/commander.js +39 -7
- package/dist/experimental/makeExperimental.d.ts +3 -54
- package/dist/experimental/makeExperimental.d.ts.map +1 -1
- package/dist/experimental/toast.d.ts +1 -1
- package/package.json +1 -1
- package/src/experimental/commander.ts +373 -321
- package/test/Mutation.test.ts +46 -46
- package/test/dist/stubs.d.ts +4 -54
- package/test/dist/stubs.d.ts.map +1 -1
package/test/Mutation.test.ts
CHANGED
|
@@ -16,7 +16,7 @@ it.live("works", () =>
|
|
|
16
16
|
const command = Command.fn("Test Action")(
|
|
17
17
|
function*() {
|
|
18
18
|
expect(yield* Effect.currentSpan.pipe(Effect.map((_) => _.name))).toBe("Test Action")
|
|
19
|
-
expect(command.
|
|
19
|
+
expect(command.waiting).toBe(true)
|
|
20
20
|
|
|
21
21
|
expect(yield* CommandContext).toEqual({ action: "Test Action" })
|
|
22
22
|
|
|
@@ -32,15 +32,15 @@ it.live("works", () =>
|
|
|
32
32
|
),
|
|
33
33
|
Effect.tap(() => executed = true)
|
|
34
34
|
)
|
|
35
|
-
expect(command.
|
|
35
|
+
expect(command.action).toBe("Test Action")
|
|
36
36
|
|
|
37
|
-
const r = yield* Fiber.join(command.
|
|
38
|
-
expect(command.
|
|
37
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
38
|
+
expect(command.waiting).toBe(false)
|
|
39
39
|
|
|
40
40
|
expect(r).toBe("test-value") // to confirm that the initial function has ran.
|
|
41
41
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
42
42
|
|
|
43
|
-
expect(command.
|
|
43
|
+
expect(command.result.pipe(Result.value)).toEqual(Option.some("test-value"))
|
|
44
44
|
|
|
45
45
|
expect(toasts.length).toBe(0)
|
|
46
46
|
}))
|
|
@@ -65,8 +65,8 @@ it.live("has custom action name", () =>
|
|
|
65
65
|
},
|
|
66
66
|
Effect.tap(() => executed = true)
|
|
67
67
|
)
|
|
68
|
-
expect(command.
|
|
69
|
-
const r = yield* Fiber.join(command.
|
|
68
|
+
expect(command.action).toBe("Test Action Translated")
|
|
69
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
70
70
|
|
|
71
71
|
expect(r).toBe("test-value") // to confirm that the initial function has ran.
|
|
72
72
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -89,7 +89,7 @@ it.live("can map the result", () =>
|
|
|
89
89
|
Effect.map((_) => _ + _),
|
|
90
90
|
Effect.tap(() => executed = true)
|
|
91
91
|
)
|
|
92
|
-
const r = yield* Fiber.join(command.
|
|
92
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
93
93
|
|
|
94
94
|
expect(r).toBe("test-valuetest-value") // to confirm that the initial function and map has ran.
|
|
95
95
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -111,7 +111,7 @@ it.live("can receive and use input", () =>
|
|
|
111
111
|
},
|
|
112
112
|
Effect.tap(() => executed = true)
|
|
113
113
|
)
|
|
114
|
-
const r = yield* Fiber.join(command.
|
|
114
|
+
const r = yield* Fiber.join(command.handle(1, "2")).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
115
115
|
|
|
116
116
|
expect(r).toEqual({ input1: 1, input2: "2" }) // to confirm that the initial function has ran and received input.
|
|
117
117
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -137,7 +137,7 @@ it.live("can replace the result", () =>
|
|
|
137
137
|
Effect.zipRight(Effect.succeed(42)),
|
|
138
138
|
Effect.tap(() => executed = true)
|
|
139
139
|
)
|
|
140
|
-
const r = yield* Fiber.join(command.
|
|
140
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
141
141
|
|
|
142
142
|
expect(r).toBe(42) // to confirm that the initial function and zipRight has ran.
|
|
143
143
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -173,7 +173,7 @@ it.live("with toasts", () =>
|
|
|
173
173
|
Effect.tap(() => executed = true)
|
|
174
174
|
)
|
|
175
175
|
|
|
176
|
-
const r = yield* Fiber.join(command.
|
|
176
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
177
177
|
|
|
178
178
|
expect(r).toBe("test-value") // to confirm that the initial function has ran.
|
|
179
179
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -199,13 +199,13 @@ it.live("interrupted", () =>
|
|
|
199
199
|
Effect.tap(() => executed = true)
|
|
200
200
|
)
|
|
201
201
|
|
|
202
|
-
const r = yield* Fiber.join(command.
|
|
202
|
+
const r = yield* Fiber.join(command.handle()) // we receive an Exit as errors/results are processed
|
|
203
203
|
|
|
204
204
|
expect(executed).toBe(false) // we were interrupted after all :)
|
|
205
205
|
expect(Exit.isInterrupted(r)).toBe(true) // to confirm that the initial function has interrupted
|
|
206
206
|
|
|
207
|
-
expect(command.
|
|
208
|
-
expect(Exit.isInterrupted(Result.toExit(command.
|
|
207
|
+
expect(command.waiting).toBe(false)
|
|
208
|
+
expect(Exit.isInterrupted(Result.toExit(command.result))).toBe(true)
|
|
209
209
|
expect(toasts.length).toBe(0) // toast is removed on interruption. TODO: maybe a nicer user experience can be had?
|
|
210
210
|
}))
|
|
211
211
|
|
|
@@ -225,13 +225,13 @@ it.live("fail", () =>
|
|
|
225
225
|
Effect.tap(() => executed = true)
|
|
226
226
|
)
|
|
227
227
|
|
|
228
|
-
const r = yield* Fiber.join(command.
|
|
228
|
+
const r = yield* Fiber.join(command.handle()) // we receive an Exit as errors/results are processed
|
|
229
229
|
|
|
230
230
|
expect(executed).toBe(false) // we failed after all :)
|
|
231
231
|
expect(Exit.isFailure(r) && Cause.isFailure(r.cause)).toBe(true) // to confirm that the initial function has failed
|
|
232
232
|
|
|
233
|
-
expect(command.
|
|
234
|
-
expect(Exit.isFailure(Result.toExit(command.
|
|
233
|
+
expect(command.waiting).toBe(false)
|
|
234
|
+
expect(Exit.isFailure(Result.toExit(command.result))).toBe(true)
|
|
235
235
|
expect(toasts.length).toBe(1) // toast should show error
|
|
236
236
|
expect(toasts[0].message).toBe("Test Action Failed:\nBoom!")
|
|
237
237
|
}))
|
|
@@ -253,13 +253,13 @@ it.live("fail and recover", () =>
|
|
|
253
253
|
Effect.tap(() => executed = true)
|
|
254
254
|
)
|
|
255
255
|
|
|
256
|
-
const r = yield* Fiber.join(command.
|
|
256
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed
|
|
257
257
|
|
|
258
258
|
expect(executed).toBe(true) // we recovered after all :)
|
|
259
259
|
expect(r).toBe("recovered") // to confirm that the initial function has failed but we recovered
|
|
260
260
|
|
|
261
|
-
expect(command.
|
|
262
|
-
expect(Result.toExit(command.
|
|
261
|
+
expect(command.waiting).toBe(false)
|
|
262
|
+
expect(Result.toExit(command.result)).toEqual(Exit.succeed("recovered"))
|
|
263
263
|
expect(toasts.length).toBe(1) // toast should show error
|
|
264
264
|
expect(toasts[0].message).toBe("Test Action Success")
|
|
265
265
|
}))
|
|
@@ -280,14 +280,14 @@ it.live("defect", () =>
|
|
|
280
280
|
Effect.tap(() => executed = true)
|
|
281
281
|
)
|
|
282
282
|
|
|
283
|
-
const r = yield* Fiber.join(command.
|
|
283
|
+
const r = yield* Fiber.join(command.handle()) // we receive an Exit as errors/results are processed
|
|
284
284
|
// TODO: confirm we reported error
|
|
285
285
|
|
|
286
286
|
expect(executed).toBe(false) // we died after all :)
|
|
287
287
|
expect(Exit.isFailure(r) && Cause.isDie(r.cause)).toBe(true) // to confirm that the initial function has died
|
|
288
288
|
|
|
289
|
-
expect(command.
|
|
290
|
-
expect(Exit.isFailure(Result.toExit(command.
|
|
289
|
+
expect(command.waiting).toBe(false)
|
|
290
|
+
expect(Exit.isFailure(Result.toExit(command.result))).toBe(true)
|
|
291
291
|
expect(toasts.length).toBe(1) // toast should show error
|
|
292
292
|
expect(toasts[0].message).toBe("Test Action unexpected error, please try again shortly.")
|
|
293
293
|
}))
|
|
@@ -304,7 +304,7 @@ it.live("works with alt", () =>
|
|
|
304
304
|
Effect.fnUntraced(
|
|
305
305
|
function*() {
|
|
306
306
|
expect(yield* Effect.currentSpan.pipe(Effect.map((_) => _.name))).toBe("Test Action")
|
|
307
|
-
expect(command.
|
|
307
|
+
expect(command.waiting).toBe(true)
|
|
308
308
|
|
|
309
309
|
expect(yield* CommandContext).toEqual({ action: "Test Action" })
|
|
310
310
|
|
|
@@ -321,15 +321,15 @@ it.live("works with alt", () =>
|
|
|
321
321
|
Effect.tap(() => executed = true)
|
|
322
322
|
)
|
|
323
323
|
)
|
|
324
|
-
expect(command.
|
|
324
|
+
expect(command.action).toBe("Test Action")
|
|
325
325
|
|
|
326
|
-
const r = yield* Fiber.join(command.
|
|
327
|
-
expect(command.
|
|
326
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
327
|
+
expect(command.waiting).toBe(false)
|
|
328
328
|
|
|
329
329
|
expect(r).toBe("test-value") // to confirm that the initial function has ran.
|
|
330
330
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
331
331
|
|
|
332
|
-
expect(command.
|
|
332
|
+
expect(command.result.pipe(Result.value)).toEqual(Option.some("test-value"))
|
|
333
333
|
|
|
334
334
|
expect(toasts.length).toBe(0)
|
|
335
335
|
}))
|
|
@@ -356,8 +356,8 @@ it.live("has custom action name with alt", () =>
|
|
|
356
356
|
Effect.tap(() => executed = true)
|
|
357
357
|
)
|
|
358
358
|
)
|
|
359
|
-
expect(command.
|
|
360
|
-
const r = yield* Fiber.join(command.
|
|
359
|
+
expect(command.action).toBe("Test Action Translated")
|
|
360
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
361
361
|
|
|
362
362
|
expect(r).toBe("test-value") // to confirm that the initial function has ran.
|
|
363
363
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -380,7 +380,7 @@ it.live("can map the result with alt", () =>
|
|
|
380
380
|
Effect.map((_) => _ + _),
|
|
381
381
|
Effect.tap(() => executed = true)
|
|
382
382
|
))
|
|
383
|
-
const r = yield* Fiber.join(command.
|
|
383
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
384
384
|
|
|
385
385
|
expect(r).toBe("test-valuetest-value") // to confirm that the initial function and map has ran.
|
|
386
386
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -404,7 +404,7 @@ it.live("can receive and use input with alt", () =>
|
|
|
404
404
|
Effect.tap(() => executed = true)
|
|
405
405
|
)
|
|
406
406
|
)
|
|
407
|
-
const r = yield* Fiber.join(command.
|
|
407
|
+
const r = yield* Fiber.join(command.handle(1, "2")).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
408
408
|
|
|
409
409
|
expect(r).toEqual({ input1: 1, input2: "2" }) // to confirm that the initial function has ran and received input.
|
|
410
410
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -432,7 +432,7 @@ it.live("can replace the result with alt", () =>
|
|
|
432
432
|
Effect.tap(() => executed = true)
|
|
433
433
|
)
|
|
434
434
|
)
|
|
435
|
-
const r = yield* Fiber.join(command.
|
|
435
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
436
436
|
|
|
437
437
|
expect(r).toBe(42) // to confirm that the initial function and zipRight has ran.
|
|
438
438
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -470,7 +470,7 @@ it.live("with toasts with alt", () =>
|
|
|
470
470
|
)
|
|
471
471
|
)
|
|
472
472
|
|
|
473
|
-
const r = yield* Fiber.join(command.
|
|
473
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed, so we flatten it.
|
|
474
474
|
|
|
475
475
|
expect(r).toBe("test-value") // to confirm that the initial function has ran.
|
|
476
476
|
expect(executed).toBe(true) // to confirm that the combinators have ran.
|
|
@@ -499,13 +499,13 @@ it.live("interrupted with alt", () =>
|
|
|
499
499
|
)
|
|
500
500
|
)
|
|
501
501
|
|
|
502
|
-
const r = yield* Fiber.join(command.
|
|
502
|
+
const r = yield* Fiber.join(command.handle()) // we receive an Exit as errors/results are processed
|
|
503
503
|
|
|
504
504
|
expect(executed).toBe(false) // we were interrupted after all :)
|
|
505
505
|
expect(Exit.isInterrupted(r)).toBe(true) // to confirm that the initial function has interrupted
|
|
506
506
|
|
|
507
|
-
expect(command.
|
|
508
|
-
expect(Exit.isInterrupted(Result.toExit(command.
|
|
507
|
+
expect(command.waiting).toBe(false)
|
|
508
|
+
expect(Exit.isInterrupted(Result.toExit(command.result))).toBe(true)
|
|
509
509
|
expect(toasts.length).toBe(0) // toast is removed on interruption. TODO: maybe a nicer user experience can be had?
|
|
510
510
|
}))
|
|
511
511
|
|
|
@@ -527,13 +527,13 @@ it.live("fail with alt", () =>
|
|
|
527
527
|
)
|
|
528
528
|
)
|
|
529
529
|
|
|
530
|
-
const r = yield* Fiber.join(command.
|
|
530
|
+
const r = yield* Fiber.join(command.handle()) // we receive an Exit as errors/results are processed
|
|
531
531
|
|
|
532
532
|
expect(executed).toBe(false) // we failed after all :)
|
|
533
533
|
expect(Exit.isFailure(r) && Cause.isFailure(r.cause)).toBe(true) // to confirm that the initial function has failed
|
|
534
534
|
|
|
535
|
-
expect(command.
|
|
536
|
-
expect(Exit.isFailure(Result.toExit(command.
|
|
535
|
+
expect(command.waiting).toBe(false)
|
|
536
|
+
expect(Exit.isFailure(Result.toExit(command.result))).toBe(true)
|
|
537
537
|
expect(toasts.length).toBe(1) // toast should show error
|
|
538
538
|
expect(toasts[0].message).toBe("Test Action Failed:\nBoom!")
|
|
539
539
|
}))
|
|
@@ -557,13 +557,13 @@ it.live("fail and recover with alt", () =>
|
|
|
557
557
|
)
|
|
558
558
|
)
|
|
559
559
|
|
|
560
|
-
const r = yield* Fiber.join(command.
|
|
560
|
+
const r = yield* Fiber.join(command.handle()).pipe(Effect.flatten) // we receive an Exit as errors/results are processed
|
|
561
561
|
|
|
562
562
|
expect(executed).toBe(true) // we recovered after all :)
|
|
563
563
|
expect(r).toBe("recovered") // to confirm that the initial function has failed but we recovered
|
|
564
564
|
|
|
565
|
-
expect(command.
|
|
566
|
-
expect(Result.toExit(command.
|
|
565
|
+
expect(command.waiting).toBe(false)
|
|
566
|
+
expect(Result.toExit(command.result)).toEqual(Exit.succeed("recovered"))
|
|
567
567
|
expect(toasts.length).toBe(1) // toast should show error
|
|
568
568
|
expect(toasts[0].message).toBe("Test Action Success")
|
|
569
569
|
}))
|
|
@@ -586,14 +586,14 @@ it.live("defect with alt", () =>
|
|
|
586
586
|
)
|
|
587
587
|
)
|
|
588
588
|
|
|
589
|
-
const r = yield* Fiber.join(command.
|
|
589
|
+
const r = yield* Fiber.join(command.handle()) // we receive an Exit as errors/results are processed
|
|
590
590
|
// TODO: confirm we reported error
|
|
591
591
|
|
|
592
592
|
expect(executed).toBe(false) // we died after all :)
|
|
593
593
|
expect(Exit.isFailure(r) && Cause.isDie(r.cause)).toBe(true) // to confirm that the initial function has died
|
|
594
594
|
|
|
595
|
-
expect(command.
|
|
596
|
-
expect(Exit.isFailure(Result.toExit(command.
|
|
595
|
+
expect(command.waiting).toBe(false)
|
|
596
|
+
expect(Exit.isFailure(Result.toExit(command.result))).toBe(true)
|
|
597
597
|
expect(toasts.length).toBe(1) // toast should show error
|
|
598
598
|
expect(toasts[0].message).toBe("Test Action unexpected error, please try again shortly.")
|
|
599
599
|
}))
|
package/test/dist/stubs.d.ts
CHANGED
|
@@ -1,66 +1,16 @@
|
|
|
1
1
|
import { type MessageFormatElement } from "@formatjs/icu-messageformat-parser";
|
|
2
2
|
import { Effect, Layer } from "effect-app";
|
|
3
|
+
import { Commander } from "../src/experimental/commander.js";
|
|
3
4
|
import { IntlSvc } from "../src/experimental/intl.js";
|
|
4
5
|
export declare const fakeIntlLayer: (messages?: Record<string, string> | Record<string, MessageFormatElement[]>) => Layer.Layer<IntlSvc, never, never>;
|
|
5
6
|
export declare const useExperimental: (options?: {
|
|
6
7
|
messages?: Record<string, string> | Record<string, MessageFormatElement[]>;
|
|
7
8
|
toasts: any[];
|
|
8
9
|
}) => {
|
|
9
|
-
alt: (actionName: string) => <Args extends
|
|
10
|
-
fn: (actionName: string) =>
|
|
11
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>, AEff, Args extends Array<any>>(body: (...args: Args) => Generator<Eff, AEff, never>): import("vue").ComputedRef<((...a: Args) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<AEff, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_1, infer _R>>] ? E_1 : never>, never>) & {
|
|
12
|
-
action: string;
|
|
13
|
-
result: import("@effect-atom/atom/Result").Result<AEff, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_1, infer _R>>] ? E_1 : never>;
|
|
14
|
-
waiting: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_1, Args_1 extends Array<any>, A_1 extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_1) => Generator<Eff, AEff_1, never>, a: (_: Effect.Effect<AEff_1, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_1, infer _R>>] ? E_1 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_1>) => A_1): import("vue").ComputedRef<((...a: Args_1) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<A_1>, Effect.Effect.Error<A_1>>, never>) & {
|
|
17
|
-
action: string;
|
|
18
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<A_1>, Effect.Effect.Error<A_1>>;
|
|
19
|
-
waiting: boolean;
|
|
20
|
-
}>;
|
|
21
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_2, Args_2 extends Array<any>, A_2, B extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_2) => Generator<Eff, AEff_2, never>, a: (_: Effect.Effect<AEff_2, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_1, infer _R>>] ? E_1 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_2>) => A_2, b: (_: A_2, ...args: import("effect/Types").NoInfer<Args_2>) => B): import("vue").ComputedRef<((...a: Args_2) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<B>, Effect.Effect.Error<B>>, never>) & {
|
|
22
|
-
action: string;
|
|
23
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<B>, Effect.Effect.Error<B>>;
|
|
24
|
-
waiting: boolean;
|
|
25
|
-
}>;
|
|
26
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_3, Args_3 extends Array<any>, A_3, B_1, C extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_3) => Generator<Eff, AEff_3, never>, a: (_: Effect.Effect<AEff_3, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_1, infer _R>>] ? E_1 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_3>) => A_3, b: (_: A_3, ...args: import("effect/Types").NoInfer<Args_3>) => B_1, c: (_: B_1, ...args: import("effect/Types").NoInfer<Args_3>) => C): import("vue").ComputedRef<((...a: Args_3) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<C>, Effect.Effect.Error<C>>, never>) & {
|
|
27
|
-
action: string;
|
|
28
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<C>, Effect.Effect.Error<C>>;
|
|
29
|
-
waiting: boolean;
|
|
30
|
-
}>;
|
|
31
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_4, Args_4 extends Array<any>, A_4, B_2, C_1, D extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_4) => Generator<Eff, AEff_4, never>, a: (_: Effect.Effect<AEff_4, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_1, infer _R>>] ? E_1 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_4>) => A_4, b: (_: A_4, ...args: import("effect/Types").NoInfer<Args_4>) => B_2, c: (_: B_2, ...args: import("effect/Types").NoInfer<Args_4>) => C_1, d: (_: C_1, ...args: import("effect/Types").NoInfer<Args_4>) => D): import("vue").ComputedRef<((...a: Args_4) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<D>, Effect.Effect.Error<D>>, never>) & {
|
|
32
|
-
action: string;
|
|
33
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<D>, Effect.Effect.Error<D>>;
|
|
34
|
-
waiting: boolean;
|
|
35
|
-
}>;
|
|
36
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_5, Args_5 extends Array<any>, A_5, B_3, C_2, D_1, E_1 extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_5) => Generator<Eff, AEff_5, never>, a: (_: Effect.Effect<AEff_5, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_2, infer _R>>] ? E_2 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_5>) => A_5, b: (_: A_5, ...args: import("effect/Types").NoInfer<Args_5>) => B_3, c: (_: B_3, ...args: import("effect/Types").NoInfer<Args_5>) => C_2, d: (_: C_2, ...args: import("effect/Types").NoInfer<Args_5>) => D_1, e: (_: D_1, ...args: import("effect/Types").NoInfer<Args_5>) => E_1): import("vue").ComputedRef<((...a: Args_5) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<E_1>, Effect.Effect.Error<E_1>>, never>) & {
|
|
37
|
-
action: string;
|
|
38
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<E_1>, Effect.Effect.Error<E_1>>;
|
|
39
|
-
waiting: boolean;
|
|
40
|
-
}>;
|
|
41
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_6, Args_6 extends Array<any>, A_6, B_4, C_3, D_2, E_2, F extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_6) => Generator<Eff, AEff_6, never>, a: (_: Effect.Effect<AEff_6, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_3, infer _R>>] ? E_3 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_6>) => A_6, b: (_: A_6, ...args: import("effect/Types").NoInfer<Args_6>) => B_4, c: (_: B_4, ...args: import("effect/Types").NoInfer<Args_6>) => C_3, d: (_: C_3, ...args: import("effect/Types").NoInfer<Args_6>) => D_2, e: (_: D_2, ...args: import("effect/Types").NoInfer<Args_6>) => E_2, f: (_: E_2, ...args: import("effect/Types").NoInfer<Args_6>) => F): import("vue").ComputedRef<((...a: Args_6) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<F>, Effect.Effect.Error<F>>, never>) & {
|
|
42
|
-
action: string;
|
|
43
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<F>, Effect.Effect.Error<F>>;
|
|
44
|
-
waiting: boolean;
|
|
45
|
-
}>;
|
|
46
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_7, Args_7 extends Array<any>, A_7, B_5, C_4, D_3, E_3, F_1, G extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_7) => Generator<Eff, AEff_7, never>, a: (_: Effect.Effect<AEff_7, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_4, infer _R>>] ? E_4 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_7>) => A_7, b: (_: A_7, ...args: import("effect/Types").NoInfer<Args_7>) => B_5, c: (_: B_5, ...args: import("effect/Types").NoInfer<Args_7>) => C_4, d: (_: C_4, ...args: import("effect/Types").NoInfer<Args_7>) => D_3, e: (_: D_3, ...args: import("effect/Types").NoInfer<Args_7>) => E_3, f: (_: E_3, ...args: import("effect/Types").NoInfer<Args_7>) => F_1, g: (_: F_1, ...args: import("effect/Types").NoInfer<Args_7>) => G): import("vue").ComputedRef<((...a: Args_7) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<G>, Effect.Effect.Error<G>>, never>) & {
|
|
47
|
-
action: string;
|
|
48
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<G>, Effect.Effect.Error<G>>;
|
|
49
|
-
waiting: boolean;
|
|
50
|
-
}>;
|
|
51
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_8, Args_8 extends Array<any>, A_8, B_6, C_5, D_4, E_4, F_2, G_1, H extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_8) => Generator<Eff, AEff_8, never>, a: (_: Effect.Effect<AEff_8, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_5, infer _R>>] ? E_5 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_8>) => A_8, b: (_: A_8, ...args: import("effect/Types").NoInfer<Args_8>) => B_6, c: (_: B_6, ...args: import("effect/Types").NoInfer<Args_8>) => C_5, d: (_: C_5, ...args: import("effect/Types").NoInfer<Args_8>) => D_4, e: (_: D_4, ...args: import("effect/Types").NoInfer<Args_8>) => E_4, f: (_: E_4, ...args: import("effect/Types").NoInfer<Args_8>) => F_2, g: (_: F_2, ...args: import("effect/Types").NoInfer<Args_8>) => G_1, h: (_: G_1, ...args: import("effect/Types").NoInfer<Args_8>) => H): import("vue").ComputedRef<((...a: Args_8) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<H>, Effect.Effect.Error<H>>, never>) & {
|
|
52
|
-
action: string;
|
|
53
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<H>, Effect.Effect.Error<H>>;
|
|
54
|
-
waiting: boolean;
|
|
55
|
-
}>;
|
|
56
|
-
<Eff extends import("effect/Utils").YieldWrap<Effect.Effect<any, any, any>>, AEff_9, Args_9 extends Array<any>, A_9, B_7, C_6, D_5, E_5, F_3, G_2, H_1, I extends Effect.Effect<any, any, import("../src/experimental/commander.js").CommandContext>>(body: (...args: Args_9) => Generator<Eff, AEff_9, never>, a: (_: Effect.Effect<AEff_9, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A, infer E_6, infer _R>>] ? E_6 : never, [Eff] extends [never] ? never : [Eff] extends [import("effect/Utils").YieldWrap<Effect.Effect<infer _A_1, infer _E, infer R_2>>] ? R_2 : never>, ...args: import("effect/Types").NoInfer<Args_9>) => A_9, b: (_: A_9, ...args: import("effect/Types").NoInfer<Args_9>) => B_7, c: (_: B_7, ...args: import("effect/Types").NoInfer<Args_9>) => C_6, d: (_: C_6, ...args: import("effect/Types").NoInfer<Args_9>) => D_5, e: (_: D_5, ...args: import("effect/Types").NoInfer<Args_9>) => E_5, f: (_: E_5, ...args: import("effect/Types").NoInfer<Args_9>) => F_3, g: (_: F_3, ...args: import("effect/Types").NoInfer<Args_9>) => G_2, h: (_: G_2, ...args: import("effect/Types").NoInfer<Args_9>) => H_1, i: (_: H_1, ...args: import("effect/Types").NoInfer<Args_9>) => I): import("vue").ComputedRef<((...a: Args_9) => import("effect/Fiber").RuntimeFiber<import("effect/Exit").Exit<Effect.Effect.Success<I>, Effect.Effect.Error<I>>, never>) & {
|
|
57
|
-
action: string;
|
|
58
|
-
result: import("@effect-atom/atom/Result").Result<Effect.Effect.Success<I>, Effect.Effect.Error<I>>;
|
|
59
|
-
waiting: boolean;
|
|
60
|
-
}>;
|
|
61
|
-
};
|
|
10
|
+
alt: (actionName: string) => <Args extends Array<any>, A, E, R_1 extends import("../src/experimental/commander.js").CommandContext>(handler: (...args: Args) => Effect.Effect<A, E, R_1>) => Commander.CommandOut<Args, A, E>;
|
|
11
|
+
fn: (actionName: string) => Commander.Gen<never>;
|
|
62
12
|
confirmOrInterrupt: (message?: string | undefined) => Effect.Effect<void, never, import("../src/experimental/commander.js").CommandContext>;
|
|
63
|
-
withDefaultToast: <
|
|
13
|
+
withDefaultToast: <A_1, E_1>(errorRenderer?: ((e: E_1) => string | undefined) | undefined) => (self: Effect.Effect<A_1, E_1, import("../src/experimental/commander.js").CommandContext>) => Effect.Effect<A_1, E_1, import("../src/experimental/commander.js").CommandContext>;
|
|
64
14
|
_tag: "Commander";
|
|
65
15
|
};
|
|
66
16
|
//# sourceMappingURL=stubs.d.ts.map
|
package/test/dist/stubs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../stubs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAE9E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../stubs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,oCAAoC,CAAA;AAE9E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AA8CrD,eAAO,MAAM,aAAa,GAAI,WAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAM,uCAgBzG,CAAA;AAEH,eAAO,MAAM,eAAe,GAC1B,UAAU;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,GAAG,EAAE,CAAA;CAAE;;;gCA/D1F,CAAC;8CAGY,CAAC;;CAmE5B,CAAA"}
|