Skip to content

Commit 0adeb69

Browse files
authored
Merge pull request #14 from MrRefactoring/master
chore: fix interface syntax in TS
2 parents f798b67 + 0f9bacb commit 0adeb69

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## UNRELEASED
2+
3+
- fix: `options` in constructor now is optional parameter in types for TS.
4+
15
## 1.0.2 (2023-04-07)
26
- fix: correctly export types for TS when used CommonJS
37
- chore: update dev packages

src/index.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { Compiler, WebpackPluginInstance } from 'webpack';
22

33
interface IOptions {
44
enabled: boolean;
5-
extensions: Array<string> | RegExp,
6-
ignore: string | RegExp | string[] | RegExp[],
7-
remove: RegExp,
8-
stage: number,
5+
extensions: Array<string> | RegExp;
6+
ignore: string | RegExp | string[] | RegExp[];
7+
remove: RegExp;
8+
stage: number;
99
verbose: boolean;
1010
}
1111

@@ -19,7 +19,7 @@ declare class WebpackRemoveEmptyScriptsPlugin implements WebpackPluginInstance {
1919
public static STAGE_BEFORE_PROCESS_PLUGINS: number;
2020
public static STAGE_AFTER_PROCESS_PLUGINS: number;
2121

22-
constructor(options: WebpackRemoveEmptyScriptsPlugin.Options);
22+
constructor(options?: WebpackRemoveEmptyScriptsPlugin.Options);
2323

2424
apply(compiler: Compiler): void;
2525
}

0 commit comments

Comments
 (0)