From 2a77b0210d40c5ecd596c954197f0d35ee6327ba Mon Sep 17 00:00:00 2001 From: loveky Date: Fri, 22 Mar 2019 22:48:09 +0800 Subject: [PATCH] optimize type definitions (#156) --- types/index.d.ts | 8 +++----- types/test/webpack-chain-tests.ts | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 4901e7b..8b8113d 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -198,11 +198,9 @@ declare namespace Config { plugin(name: string): Plugin; } - class ResolveLoader extends ChainedMap { - extensions: TypedChainedSet; - modules: TypedChainedSet; - moduleExtensions: TypedChainedSet; - packageMains: TypedChainedSet; + class ResolveLoader extends Resolve { + moduleExtensions: ChainedSet; + packageMains: ChainedSet } class Rule extends ChainedMap { diff --git a/types/test/webpack-chain-tests.ts b/types/test/webpack-chain-tests.ts index 3d37321..afb93d6 100644 --- a/types/test/webpack-chain-tests.ts +++ b/types/test/webpack-chain-tests.ts @@ -128,6 +128,9 @@ config .packageMains .add('index.js') .end() + .plugin('foo') + .use(webpack.DefinePlugin) + .end() .end() .performance