UNPKG

1.04 kBTypeScriptView Raw
1declare namespace nProgress {
2 interface NProgressOptions {
3 minimum: number;
4 template: string;
5 easing: string;
6 speed: number;
7 trickle: boolean;
8 trickleSpeed: number;
9 showSpinner: boolean;
10 parent: string;
11 positionUsing: string;
12 barSelector: string;
13 spinnerSelector: string;
14 }
15
16 interface NProgress {
17 version: string;
18 settings: NProgressOptions;
19 status: number | null;
20
21 configure(options: Partial<NProgressOptions>): NProgress;
22 set(number: number): NProgress;
23 isStarted(): boolean;
24 start(): NProgress;
25 done(force?: boolean): NProgress;
26 inc(amount?: number): NProgress;
27 trickle(): NProgress;
28
29 /* Internal */
30
31 render(fromStart?: boolean): HTMLDivElement;
32 remove(): void;
33 isRendered(): boolean;
34 getPositioningCSS(): "translate3d" | "translate" | "margin";
35 }
36}
37
38declare const nProgress: nProgress.NProgress;
39export = nProgress;