unthrown
unthrown copied to clipboard
Explicit errors as values for TypeScript — with a separate defect channel for the unexpected and qualification enforced at every boundary.
## Problem The real Yoga masking regression suite adds graphql-yoga 5.24.1, whose GraphQL Tools utility dependency is vulnerable to prototype pollution (GHSA-7mx3-vvmw-hjmv). PR #335 failed its required high-severity security audit...
## Problem fromNullable directly calls onAbsent outside a boundary. A throwing absence factory escapes instead of returning Defect. An async absence factory compiles as Result, becomes Err(Promise), and fires an...
## Problem handlerResult invokes await handler(opts, input) before its Result guards. A handler throwing ORPCError("NOT_FOUND", { message: "private handler detail" }) when NOT_FOUND is declared becomes a modeled Err and...
## Problem The pothos bridge throws unclaimed Defect causes unchanged. A GraphQLError is already treated as a public refusal by Yoga. Reproduced with a resultField resolving fromSafeThrowable(() => { throw...
Filed from `btravstack/btravstack`, the way #92 was: the convention was written down there, held by review, and drifted anyway. ## What the rule would flag ```ts Ok(value).toAsync() // → OkAsync(value)...
`unthrown` has `DoAsync().bind()` for a sequence where a later step needs an earlier step's **value**. It has nothing for a sequence where a later step's **failure** must undo the earlier...
Observed live in btravstack/start#99, bumping `unthrown` 5.5.0 → 5.6.0. ## What happened Every companion package carries `unthrown` as a **regular dependency** with a caret range (measured on today's `latest` of...
Raised from `btravstack/start`, where the trap is felt — see btravstack/start#68 and its fix. ## The trap An `AsyncResult` is eager: constructing it starts the work. So the spelling a...
### Problem *— I would open this as a discussion, but this repo has disabled discussions tab.* First, thank you so much for the effort you've put in this library....
Found while auditing `btravstack/start` (2026-08-13). `@unthrown/oxlint`'s `no-catch-all-pattern` documentation already names the legitimate `P._` cases: a helper generic in `E`, or an `E` that is a **single non-union type** with nothing...