cloudfunctions/SegmentPortraitPic/node_modules/@cloudbase/database/dist/commonjs/utils/error.d.ts

(完整代码) 1KB

export interface ICloudSDKError extends Error {
    errCode: number;
    errMsg: string;
}
export declare class CloudSDKError extends Error {
    errCode: string;
    errMsg: string;
    requestID?: string;
    constructor(options: IErrorConstructorOptions);
    message: string;
}
interface IErrorConstructorOptions {
    errCode?: string;
    errMsg: string;
}
export declare function isSDKError(error: any): error is CloudSDKError;
export interface IGenericError<T extends string, P = any> extends Error {
    type: T;
    payload: P;
    generic: boolean;
}
export declare const isGenericError: <T extends string, P>(e: any) => e is IGenericError<T, P>;
export declare class TimeoutError extends Error implements IGenericError<'timeout', null> {
    type: "timeout";
    payload: any;
    generic: boolean;
    constructor(message: string);
}
export declare const isTimeoutError: (e: any) => e is TimeoutError;
export declare class CancelledError extends Error implements IGenericError<'cancelled', null> {
    type: "cancelled";
    payload: any;
    generic: boolean;
    constructor(message: string);
}
export declare const isCancelledError: (e: any) => e is CancelledError;
export {};

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。