export type TryCatchOk<T> = {
    ok: true;
    data: T;
    error: undefined;
};
export type TryCatchErr<E> = {
    ok: false;
    data: undefined;
    error: E;
};
export type TryCatchResult<T, E = unknown> = TryCatchOk<T> | TryCatchErr<E>;
export declare function tryCatch<E = unknown, Fn extends (...args: any[]) => any = (...args: any[]) => any>(fn: Fn, args?: Parameters<Fn>, thisArg?: ThisParameterType<Fn>): Promise<TryCatchResult<Awaited<ReturnType<Fn>>, E>>;
