VoidResult<E> wrapped by Promise.
VoidResult<E>
Promise
The type of the error that may be produced by a failed operation.
1.4.0
async function deleteFile(path: string): AsyncVoidResult<Error> { try { await fs.unlink(path); return Ok(); } catch (e) { return Err(e as Error); }} Copy
async function deleteFile(path: string): AsyncVoidResult<Error> { try { await fs.unlink(path); return Ok(); } catch (e) { return Err(e as Error); }}
VoidResult<E>wrapped byPromise.