UNPKG

977 BTypeScriptView Raw
1import { GemElement } from '@mantou/gem/lib/element';
2import './loading';
3interface Option {
4 minDelay?: number;
5}
6export declare function waitLoading<T>(promise: Promise<T>, options?: Option & Partial<State>): Promise<T>;
7export declare const closeLoading: () => Promise<void>;
8export declare const changeLoading: (state: Partial<State>) => void;
9declare type State = {
10 text?: string;
11 transparent?: boolean;
12 position?: 'start' | 'center' | 'end';
13};
14/**
15 * @customElement dy-wait
16 */
17export declare class DuoyunWaitElement extends GemElement<State> {
18 static instance?: DuoyunWaitElement;
19 static wait: typeof waitLoading;
20 static close: () => Promise<void>;
21 static change: (state: Partial<State>) => void;
22 modal: boolean;
23 constructor(state: State);
24 state: State;
25 mounted: () => void;
26 unmounted: () => void;
27 render: () => import("lit-html/lib/template-result").TemplateResult;
28}
29export {};
30//# sourceMappingURL=wait.d.ts.map
\No newline at end of file