forked from bullhorn/novo-elements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom-typings.d.ts
46 lines (40 loc) · 1.37 KB
/
custom-typings.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Extra variables that live on Global that will be replaced by webpack DefinePlugin
declare var VERSION:string;
declare var ENV:string;
declare var hljs:any;
interface SystemJS {
import:(path?:string) => Promise<any>;
}
interface GlobalEnvironment {
ENV;
VERSION;
}
interface WebpackModule {
hot:{
data?:any,
idle:any,
accept(dependencies?:string | string[], callback?:(updatedDependencies?:any) => void):void;
decline(dependencies?:string | string[]):void;
dispose(callback?:(data?:any) => void):void;
addDisposeHandler(callback?:(data?:any) => void):void;
removeDisposeHandler(callback?:(data?:any) => void):void;
check(autoApply?:any, callback?:(err?:Error, outdatedModules?:any[]) => void):void;
apply(options?:any, callback?:(err?:Error, outdatedModules?:any[]) => void):void;
status(callback?:(status?:string) => void):void | string;
removeStatusHandler(callback?:(status?:string) => void):void;
};
}
interface WebpackRequire extends NodeRequireFunction {
context(file:string, flag?:boolean, exp?:RegExp):any;
}
// Extend typings
interface NodeRequire extends WebpackRequire {
}
interface NodeModule extends WebpackModule {
}
interface Global extends GlobalEnvironment {
}
interface Window {
fetch(url: any, init?: any): Promise<any>;
}
declare var fetch: typeof window.fetch;