Skip to content

Commit

Permalink
fix(tsd): PR-74
Browse files Browse the repository at this point in the history
  • Loading branch information
Gvozd committed Dec 19, 2021
1 parent 89c58c7 commit 9008dce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.9

import { Plugin } from 'webpack';
import { Compiler } from 'webpack';

export = WebpackNotifierPlugin;

declare const WebpackNotifierPlugin: {new (options?: WebpackNotifierPlugin.Options): Plugin};
declare class WebpackNotifierPlugin {
constructor(options?: WebpackNotifierPlugin.Options);
apply(compiler: Compiler): void;
}

declare namespace WebpackNotifierPlugin {
interface Options {
Expand Down
3 changes: 1 addition & 2 deletions test-d/index-tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Plugin } from 'webpack';
import WebpackNotifierPlugin = require('../');

const optionsArray: WebpackNotifierPlugin.Options[] = [
Expand All @@ -15,4 +14,4 @@ const optionsArray: WebpackNotifierPlugin.Options[] = [
},
];

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

0 comments on commit 9008dce

Please sign in to comment.