happy-rusty
    Preparing search index...

    Type Alias AsyncVoidResult<E>

    AsyncVoidResult: Promise<VoidResult<E>>

    VoidResult<E> wrapped by Promise.

    Type Parameters

    • E

      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);
    }
    }