// The workbench's Result: a value or the reason there is none. ply's Result shape (ok / value / error), local so the // workbench's own failures are plain strings and never a PlyError. export type Ok = { readonly ok: true; readonly value: T }; export type Err = { readonly ok: false; readonly error: E }; export type Result = Ok | Err; export const ok = (value: T): Ok => ({ ok: true, value }); export const err = (error: E): Err => ({ ok: false, error });