一键导入
effect-module-cause
Guidance for `effect/Cause` focused on APIs like map, fail, and Fail. Load after `effect-skill-router` when this module is the primary owner.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Guidance for `effect/Cause` focused on APIs like map, fail, and Fail. Load after `effect-skill-router` when this module is the primary owner.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guidance for facet `effect/Channel#composition` focused on APIs like map, flatMap, and mapDone. Load after `effect-skill-router` when this facet is the primary owner.
Guidance for facet `effect/Channel#core` focused on APIs like runDone, runFold, and runHead. Load after `effect-skill-router` when this facet is the primary owner.
Guidance for facet `effect/Channel#utilities` focused on APIs like provide, mapError, and mapInputError. Load after `effect-skill-router` when this facet is the primary owner.
Guidance for facet `effect/Effect#composition` focused on APIs like map, flatMap, and mapBoth. Load after `effect-skill-router` when this facet is the primary owner.
Guidance for facet `effect/Effect#concurrency` focused on APIs like runFork, runForkWith, and race. Load after `effect-skill-router` when this facet is the primary owner.
Guidance for facet `effect/Effect#context-di` focused on APIs like provide, service, and services. Load after `effect-skill-router` when this facet is the primary owner.
| name | effect-module-cause |
| description | Guidance for `effect/Cause` focused on APIs like map, fail, and Fail. Load after `effect-skill-router` when this module is the primary owner. |
effect/Cause.packages/effect/src/Cause.ts.mapfailFailemptyfromReasonsmakeDieReasonfilterInterruptorsmakeFailReasonmakeInterruptReasonisDonehasDiesisCausehasFailsisReasonisDieReasonisFailReasondieDiereferences/api-reference.mdimport { Cause, Effect } from "effect";
const program = Effect.gen(function* () {
const cause = yield* Effect.sandbox(
Effect.all([Effect.fail("err1"), Effect.die("defect"), Effect.fail("err2")], {
concurrency: "unbounded",
}),
).pipe(Effect.flip);
const errors = cause.reasons.filter(Cause.isFailReason).map((r) => r.error);
const defects = cause.reasons.filter(Cause.isDieReason).map((r) => r.defect);
console.log(errors); // ["err1", "err2"] (order may vary)
console.log(defects); // ["defect"]
});
Effect.runPromise(program);
effect/* and effect/unstable/* are out of scope for this owner.effect-skill-router for routing and ownership checks.packages/effect/src/Cause.tspackages/effect/test/Deferred.test.tspackages/effect/test/Request.test.tspackages/effect/test/schema/representation/toCodeDocument.test.tspackages/effect/test/unstable/sql/SqlSchema.test.tspackages/effect/test/Channel.test.tspackages/effect/test/cluster/ClusterWorkflowEngine.test.tsreferences/api-reference.mdreferences/usage-reference.mdreferences/owner.md