import { Loose } from '@daysnap/types'; type WithFalse = T | false; /** * loading 生成器 * const withLoading = createWithLoading(() => showLoading()) * const fn = withLoading(async () => { // ... }) * fn() 执行的时候就会执行showLoading */ declare function createWithLoading(showLoading: (options: O) => Loose<{ close: () => any; }>, defaultOptions?: O): Promise>(fn: T, options?: WithFalse) => (...params: [...Parameters, (WithFalse | undefined)?]) => Promise>>; export { createWithLoading };