MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / ok

Function ok

test/README.example.spec.ts:808–808  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

806 type Result<T, E> = { kind: "ok"; value: T } | { kind: "err"; error: E };
807
808 const ok = <T>(value: T): Result<T, never> => ({ kind: "ok", value });
809 const err = <E>(error: E): Result<never, E> => ({ kind: "err", error });
810
811 const handleErrorAsResult = <R, E extends Effect, ErrorName extends string>(

Callers 3

handleErrorAsResultFunction · 0.70
range4Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected