Skip to content

Commit a5c6e4b

Browse files
authored
Merge pull request #75 from Turbo87/PR-74
Pr 74
2 parents f0b2efc + 9008dce commit a5c6e4b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
88
// TypeScript Version: 3.9
99

10-
import { Plugin } from 'webpack';
10+
import { Compiler } from 'webpack';
1111

1212
export = WebpackNotifierPlugin;
1313

14-
declare const WebpackNotifierPlugin: {new (options?: WebpackNotifierPlugin.Options): Plugin};
14+
declare class WebpackNotifierPlugin {
15+
constructor(options?: WebpackNotifierPlugin.Options);
16+
apply(compiler: Compiler): void;
17+
}
1518

1619
declare namespace WebpackNotifierPlugin {
1720
interface Options {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"@types/jest": "^26.0.15",
4444
"@types/node-notifier": "^8.0.1",
4545
"@types/semver": "^7.3.8",
46-
"@types/webpack": "^4.41.31",
46+
"@types/webpack": ">4.41.31",
4747
"eslint": "^7.14.0",
4848
"eslint-config-airbnb-base": "^14.2.1",
4949
"husky": "^4.3.0",
@@ -61,7 +61,7 @@
6161
"webpack-latest": "npm:webpack@latest"
6262
},
6363
"peerDependencies": {
64-
"@types/webpack": "^4.41.31"
64+
"@types/webpack": ">4.41.31"
6565
},
6666
"peerDependenciesMeta": {
6767
"@types/webpack": {

test-d/index-tests.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Plugin } from 'webpack';
21
import WebpackNotifierPlugin = require('../');
32

43
const optionsArray: WebpackNotifierPlugin.Options[] = [
@@ -15,4 +14,4 @@ const optionsArray: WebpackNotifierPlugin.Options[] = [
1514
},
1615
];
1716

18-
const plugins: Plugin[] = optionsArray.map(options => new WebpackNotifierPlugin(options));
17+
const plugins: WebpackNotifierPlugin[] = optionsArray.map(options => new WebpackNotifierPlugin(options));

0 commit comments

Comments
 (0)