/** * Union type to wrap the original type T and allow Errors additionally */ export declare type Try = [T, null] | [null, E]; /** * tc wraps code that throws, and returns the result OR the error thrown * * it imitates the concept (though it's not a monad) of scala.util.Try — but try is a reserved keyword, so it's called tc */ export declare function tc(asyncBlock: () => PromiseLike): PromiseLike>; export declare function tc(block: () => T): Try; export declare function tc(promise: PromiseLike): PromiseLike>; export declare function isError(e: unknown): e is Error;