Open AxelEric opened 3 years ago
have a wrong type declaration due to a bad use of ´import´ syntax.
Your code ... import { Compiler, Stats, compilation as compilationType } from 'webpack'; declare type Compilation = compilationType.Compilation;
Your code ...
import { Compiler, Stats, compilation as compilationType } from 'webpack'; declare type Compilation = compilationType.Compilation;
This give a type any to your Declared tyoe Compilation.
any
Compilation
Correction proposal ...
import { Compiler, Stats, Compilation as CompilationType } from 'webpack'; declare type Compilation = CompilationType;
import { Compiler, Stats, Compilation } from 'webpack'; ...//... handleInitial(compilation: typeof Compilation): void;
Not usefull
System: OS: Windows 10 10.0.17763 CPU: (8) x64 Intel(R) Core(TM) i7 CPU 960 @ 3.20GHz Memory: 11.54 GB / 15.99 GB Binaries: Node: 14.11.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.5 - D:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD npmPackages: clean-webpack-plugin: ^3.0.0 => 3.0.0 webpack: ^5.11.0 => 5.11.0
Note this is due to incompatibility with the type declarations provided by webpack 5.
Issue description or question
clean-webpack-plugin.d.ts
have a wrong type declaration due to a bad use of ´import´ syntax.
This give a type
any
to your Declared tyoeCompilation
.Webpack Config
Environment
Keep smyling
AxelEric.