Skip to content

Commit

Permalink
Feature/update webpack bundle analyzer to match Plugin interface (Def…
Browse files Browse the repository at this point in the history
…initelyTyped#36836)

* corrected formatting

* corrected import
  • Loading branch information
maxbogus authored and andrewbranch committed Jul 15, 2019
1 parent 0f1ab4b commit 802faae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions types/webpack-bundle-analyzer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

import * as webpack from 'webpack';
import { Plugin, Compiler, Stats } from 'webpack';

export namespace BundleAnalyzerPlugin {
type ExcludeAssetsPatternFn = (assetName: string) => boolean;
Expand Down Expand Up @@ -69,7 +69,7 @@ export namespace BundleAnalyzerPlugin {
* Options for stats.toJson() method.
* For example you can exclude sources of your modules from stats file with "source: false" option.
*/
statsOptions?: null | webpack.Stats.ToJsonOptionsObject;
statsOptions?: null | Stats.ToJsonOptionsObject;

/**
* Default: `null`.
Expand All @@ -89,6 +89,8 @@ export namespace BundleAnalyzerPlugin {
}
}

export class BundleAnalyzerPlugin extends webpack.Plugin {
export class BundleAnalyzerPlugin extends Plugin {
constructor(options?: BundleAnalyzerPlugin.Options);

apply(compiler: Compiler): void;
}

0 comments on commit 802faae

Please sign in to comment.