-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathcommon.d.ts
114 lines (106 loc) · 2.5 KB
/
common.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
declare module 'node-thrift-pool';
declare module 'ansi-html';
declare module 'koa2-connect';
declare module 'ansi-parser';
declare module 'schema-utils';
declare module 'x-path';
declare module 'koa-websocket';
declare let __resourceQuery: string;
declare namespace NodeJS {
export interface ProcessEnv {
NODE_ENV: 'development' | 'production' | 'test' | undefined;
BUILD_UMD: '1' | undefined;
RUN_ENV: 'web' | 'node';
WEB_TYPE: 'WEB_SPA' | 'WEB_SSR';
Browser: string;
ROUTER: string;
CHILDPROCESS_COMPILER_URL: string;
CHILDPROCESS_COMPILER_PORT: string;
MAIN_PORT: string;
EXPORTRUNHTML: string;
USE_ROUTE: string;
}
export interface Global {
inServer: boolean;
AppRegistry: Function;
__AWARD__PLUGINS__: {
[name: string]: {
name: string;
default?: any;
};
};
__AWARD__INIT__ROUTES__: Array<any>;
EventEmitter: global.EventEmitter;
style_cache_tip: boolean;
style_hmr_tip: boolean;
/**
* 标识样式开始hmr了
*/
style_hmr: boolean;
/**
* 标识当前样式是否发生变化的热更新
* 该值用于是否通知客户端创建link链接
*/
style_change_hmr: boolean;
/**
* 开发环境存储样式资源
*/
storeStyleSheet: any;
/**
* 存储路由的引用文件名字
*/
routeFileNames: Array<any>;
/**
* 第三方依赖的样式
*/
moduleStyles: any;
/**
* 存储引用依赖
*/
ImportSource: Array<any>;
/**
* 存储静态引用资源
* key为资源导出的文件路径
* value为资源内容实体
*/
staticSource: {
[key: string]: any;
};
/**
* 存储样式关系
*/
'es-style': {
// 存放css module
es: {
[key: string]: any;
};
// 存放公共css资源
style: { [key: string]: any };
relation: {
// 存放关系依赖
es: {
// hash => 多文件 {100:['a.js','b.js']}
hash: { [key: string]: any };
// 文件 => hash值 {'a.js': 100,'b.js':100}
file: { [key: string]: any };
};
style: {
hash: { [key: string]: any };
file: { [key: string]: any };
};
};
};
}
}
interface Window {
__AWARD__INIT__ROUTES__: Array<any>;
__INITIAL_STATE__: any;
hmr_initialState: any;
award_hmr: boolean;
award_hmr_error: {
[key: any]: any;
};
ActiveXObject: any;
jestMock: any;
awardBasename?: string;
}