type Success<T> = {
    data: T;
    error: null;
};
type Failure = {
    data: null;
    error: Error;
};
type Result<T> = Success<T> | Failure;
export declare function tryCatch<T>(func: () => Promise<T>): Promise<Result<T>>;
export declare function tryCatch<T>(func: () => T): Result<T>;
export {};
//# sourceMappingURL=tryCatch.d.ts.map