/** 默认超时(毫秒)。取较宽松的 10s,避免慢网误伤。 */ export declare const SERVICE_TIMEOUT_MS = 10000; /** 统一的超时错误,供各 hook 复用。 */ export declare function serviceTimeoutError(): Error; export interface ServiceTimeoutControl { /** 发起请求时调用:arm 一个超时;超时触发 onTimeout。重复 arm 会覆盖上一个。 */ arm: (onTimeout: () => void, ms?: number) => void; /** 回调到达 / 取消 / 卸载时调用:清掉未触发的超时。 */ clear: () => void; } export declare function useServiceTimeout(): ServiceTimeoutControl;