Skip to content

Commit

Permalink
Merge pull request #14 from MrRefactoring/master
Browse files Browse the repository at this point in the history
chore: fix interface syntax in TS
  • Loading branch information
webdiscus authored Apr 11, 2023
2 parents f798b67 + 0f9bacb commit 0adeb69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## UNRELEASED

- fix: `options` in constructor now is optional parameter in types for TS.

## 1.0.2 (2023-04-07)
- fix: correctly export types for TS when used CommonJS
- chore: update dev packages
Expand Down
10 changes: 5 additions & 5 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Compiler, WebpackPluginInstance } from 'webpack';

interface IOptions {
enabled: boolean;
extensions: Array<string> | RegExp,
ignore: string | RegExp | string[] | RegExp[],
remove: RegExp,
stage: number,
extensions: Array<string> | RegExp;
ignore: string | RegExp | string[] | RegExp[];
remove: RegExp;
stage: number;
verbose: boolean;
}

Expand All @@ -19,7 +19,7 @@ declare class WebpackRemoveEmptyScriptsPlugin implements WebpackPluginInstance {
public static STAGE_BEFORE_PROCESS_PLUGINS: number;
public static STAGE_AFTER_PROCESS_PLUGINS: number;

constructor(options: WebpackRemoveEmptyScriptsPlugin.Options);
constructor(options?: WebpackRemoveEmptyScriptsPlugin.Options);

apply(compiler: Compiler): void;
}
Expand Down

0 comments on commit 0adeb69

Please sign in to comment.