MCPcopy
hub / github.com/prisma/prisma / ok

Function ok

packages/driver-adapter-utils/src/result.ts:18–29  ·  view source on GitHub ↗
(value: T)

Source from the content-addressed store, hash-verified

16)
17
18export function ok<T>(value: T): Result<T> {
19 return {
20 ok: true,
21 value,
22 map(fn) {
23 return ok(fn(value))
24 },
25 flatMap(fn) {
26 return fn(value)
27 },
28 }
29}
30
31export function err<T>(error: Error): Result<T> {
32 return {

Callers 3

wrapAsyncFunction · 0.90
wrapSyncFunction · 0.90
mapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected