Get the data from an Ok result.
Ok
const result = ok(1);const value: number = unwrap(result); // 1 Copy
const result = ok(1);const value: number = unwrap(result); // 1
const result = Promise.resolve(ok(1));const value: Promise<number> = unwrap(result); // Promise<1> Copy
const result = Promise.resolve(ok(1));const value: Promise<number> = unwrap(result); // Promise<1>
Get the data from an
Okresult.