|
1 | 1 | import webpack = require("webpack"); |
2 | 2 |
|
3 | | -export interface UserOptionsType { |
4 | | - /** |
5 | | - * Atomically replace files content (i.e., to prevent programs like test watchers from seeing partial files). |
6 | | - * @default true |
7 | | - */ |
8 | | - atomicReplace?: boolean | undefined; |
9 | | - /** |
10 | | - * Stop writing files on webpack errors |
11 | | - * @default true |
12 | | - */ |
13 | | - exitOnErrors?: boolean | undefined; |
14 | | - /** |
15 | | - * A regular expression or function used to test if file should be written. |
16 | | - * When not present, all bundle will be written. |
17 | | - */ |
18 | | - test?: RegExp | undefined; |
19 | | - /** |
20 | | - * Use hash index to write only files that have changed since the last iteration. |
21 | | - * @default true |
22 | | - */ |
23 | | - useHashIndex?: boolean | undefined; |
24 | | - /** |
25 | | - * Logs names of the files that are being written (or skipped because they have not changed) |
26 | | - * @default true |
27 | | - */ |
28 | | - log?: boolean | undefined; |
29 | | - /** |
30 | | - * Forces the execution of the plugin regardless of being using `webpack-dev-server` or not |
31 | | - * @default false |
32 | | - */ |
33 | | - force?: boolean | undefined; |
| 3 | +declare namespace WriteFilePlugin { |
| 4 | + interface UserOptionsType { |
| 5 | + /** |
| 6 | + * Atomically replace files content (i.e., to prevent programs like test watchers from seeing partial files). |
| 7 | + * @default true |
| 8 | + */ |
| 9 | + atomicReplace?: boolean | undefined; |
| 10 | + /** |
| 11 | + * Stop writing files on webpack errors |
| 12 | + * @default true |
| 13 | + */ |
| 14 | + exitOnErrors?: boolean | undefined; |
| 15 | + /** |
| 16 | + * A regular expression or function used to test if file should be written. |
| 17 | + * When not present, all bundle will be written. |
| 18 | + */ |
| 19 | + test?: RegExp | undefined; |
| 20 | + /** |
| 21 | + * Use hash index to write only files that have changed since the last iteration. |
| 22 | + * @default true |
| 23 | + */ |
| 24 | + useHashIndex?: boolean | undefined; |
| 25 | + /** |
| 26 | + * Logs names of the files that are being written (or skipped because they have not changed) |
| 27 | + * @default true |
| 28 | + */ |
| 29 | + log?: boolean | undefined; |
| 30 | + /** |
| 31 | + * Forces the execution of the plugin regardless of being using `webpack-dev-server` or not |
| 32 | + * @default false |
| 33 | + */ |
| 34 | + force?: boolean | undefined; |
| 35 | + } |
34 | 36 | } |
35 | 37 |
|
36 | | -export default class WriteFilePlugin extends webpack.Plugin { |
37 | | - constructor(userOptions?: UserOptionsType); |
| 38 | +declare class WriteFilePlugin extends webpack.Plugin { |
| 39 | + constructor(userOptions?: WriteFilePlugin.UserOptionsType); |
38 | 40 | } |
| 41 | + |
| 42 | +export = WriteFilePlugin; |
0 commit comments