Skip to content

Commit c84a636

Browse files
authored
🤖 Merge PR DefinitelyTyped#71682 fix(write-file-webpack-plugin): fix MissingExportEquals by @hkleungai
1 parent ba3e652 commit c84a636

File tree

2 files changed

+37
-34
lines changed

2 files changed

+37
-34
lines changed

‎attw.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@
378378
"when",
379379
"winbox",
380380
"wnumb",
381-
"write-file-webpack-plugin",
382381
"yargs-parser",
383382
"yargs-parser/v20",
384383
"yargs/v16",
Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
import webpack = require("webpack");
22

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+
}
3436
}
3537

36-
export default class WriteFilePlugin extends webpack.Plugin {
37-
constructor(userOptions?: UserOptionsType);
38+
declare class WriteFilePlugin extends webpack.Plugin {
39+
constructor(userOptions?: WriteFilePlugin.UserOptionsType);
3840
}
41+
42+
export = WriteFilePlugin;

0 commit comments

Comments
 (0)