-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.d.ts
59 lines (45 loc) · 1.39 KB
/
index.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
declare module 'webpack-flush-chunks' {
import { Stats } from 'webpack';
// lazy-loading wrapper around the string outputs, in case they are not used.
interface LazyLoadedString {
toString: () => string;
}
export default function flushChunks(
stats: Stats,
options: {
chunkNames: string[];
before?: string[];
after?: string[];
/**
* Required only if you want to serve raw CSS.
*
*/
outputPath?: string;
},
): {
/** JavaScript chunks as a React component */
Js: React.Component<{}>;
/** External Stylesheets as a React component */
Styles: React.Component<{}>;
/** Raw CSS as a React component */
Css: React.Component<{}>;
/** JavaScript chunks */
js: LazyLoadedString;
/** External stylesheets */
styles: LazyLoadedString;
/** raw CSS */
css: LazyLoadedString;
/** Array of filenames */
scripts: string[];
/** Array of filenames */
stylesheets: string[];
/** Hash object of chunk names to CSS file paths */
cssHashRaw: Record<string, string>;
/** `<script>window.__CSS_CHUNKS__ = ${JSON.stringify(cssHashRaw)}</script>` */
cssHash: LazyLoadedString;
/** `<script>window.__CSS_CHUNKS__ = ${JSON.stringify(cssHashRaw)}</script>` as a React component */
CssHash: React.Component<{}>;
publicPath: string;
outputPath?: string;
};
}