import * as TE from 'fp-ts/lib/TaskEither'; export declare enum ErrorType { Internal = "Internal", API = "API", Cancelled = "Cancelled" } export declare type AppError = { readonly type: T; }; export declare type CancelledError = AppError; export declare type InternalError = AppError & { readonly message: string; readonly rootCause?: Error; }; export declare type ApiError = AppError & { readonly code: T; }; export declare const cancelledError: CancelledError; export declare const internalError: (message: string, rootCause?: Error | undefined) => InternalError; export declare const apiError: (code: T) => ApiError; export declare type TaskEitherError = TE.TaskEither; export declare type TaskExecutor = (params: P) => TaskEitherError; export declare type TaskLoader = () => TaskEitherError;