err is used to create an error Result type.
err
Result
import {err} from 'unwrapit' const v = err('error') // ^? Result<unknown, string>
You can specify the ok value type
const v = err<string, number>('error') // ^? Result<number, string>
Last updated 1 year ago