import type { Loose } from '@daysnap/types'; type ToastCallbackObject = Loose<{ setData: (data?: Record) => void; }>; type ToastCallback = ((err: unknown, message: string) => boolean | void) | string | ToastCallbackObject; declare global { interface Promise { toast(cb?: ToastCallback, isThrow?: boolean): Promise; null(): Promise; fix(): Promise; } } export interface PromiseOptions { /** 格式化错误消息 */ formatMessage?: (err: unknown) => string; /** 排除指定错误消息 */ excludeMessage?: (message: string) => boolean; /** 默认调用 showToast */ showToast?: (message: string) => void; } export declare const promise: (_: import("../codelet").Codelet, options?: PromiseOptions) => void; export {};