Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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