Function fromAsyncThrowable
- fromAsyncThrowable<A extends readonly any[], R, E>(fn: ((...args: A) => Promise<R>), errorFn?: ((err: unknown) => E)): ((...args: A) => neverthrow.ResultAsync<R, E>)
Type Parameters
- A extends readonly any[]
- R
- E
Parameters
- fn: ((...args: A) => Promise<R>)
Optional
errorFn: ((err: unknown) => E)- (err: unknown): E
Returns E