@@ -59,7 +59,7 @@ declare class CssMinimizerPlugin<T = CssNanoOptionsExtended> {
5959 * @param {Compiler } compiler Compiler
6060 * @param {Compilation } compilation Compilation
6161 * @param {Record<string, import("webpack").sources.Source> } assets Assets
62- * @param {{availableNumberOfCores: number} } optimizeOptions Optimize options
62+ * @param {{ availableNumberOfCores: number } } optimizeOptions Optimize options
6363 * @returns {Promise<void> } Promise
6464 */
6565 private optimize ;
@@ -90,6 +90,7 @@ declare namespace CssMinimizerPlugin {
9090 Parser ,
9191 Stringifier ,
9292 TraceMap ,
93+ EXPECTED_ANY ,
9394 CssNanoOptions ,
9495 Warning ,
9596 WarningObject ,
@@ -139,6 +140,7 @@ type Syntax = import("postcss").Syntax;
139140type Parser = import ( "postcss" ) . Parser ;
140141type Stringifier = import ( "postcss" ) . Stringifier ;
141142type TraceMap = import ( "@jridgewell/trace-mapping" ) . TraceMap ;
143+ type EXPECTED_ANY = any ;
142144type CssNanoOptions = Record < string , unknown > ;
143145type Warning =
144146 | ( Error & {
@@ -199,11 +201,11 @@ type MinimizedResult = {
199201 /**
200202 * Errors
201203 */
202- errors ?: Array < Error | ErrorObject | string > | undefined ;
204+ errors ?: ( Error | ErrorObject | string ) [ ] | undefined ;
203205 /**
204206 * Warnings
205207 */
206- warnings ?: Array < Warning | WarningObject | string > | undefined ;
208+ warnings ?: ( Warning | WarningObject | string ) [ ] | undefined ;
207209} ;
208210type Input = {
209211 [ file : string ] : string ;
@@ -212,7 +214,7 @@ type CustomOptions = {
212214 [ key : string ] : unknown ;
213215} ;
214216type InferDefaultType < T > = T extends infer U ? U : CustomOptions ;
215- type MinimizerOptions < T > = T extends any [ ]
217+ type MinimizerOptions < T > = T extends EXPECTED_ANY [ ]
216218 ? { [ P in keyof T ] ?: InferDefaultType < T [ P ] > }
217219 : InferDefaultType < T > ;
218220type BasicMinimizerImplementation < T > = (
@@ -226,7 +228,7 @@ type MinimizeFunctionHelpers = {
226228 */
227229 supportsWorkerThreads ?: ( ( ) => boolean | undefined ) | undefined ;
228230} ;
229- type MinimizerImplementation < T > = T extends any [ ]
231+ type MinimizerImplementation < T > = T extends EXPECTED_ANY [ ]
230232 ? {
231233 [ P in keyof T ] : BasicMinimizerImplementation < T [ P ] > &
232234 MinimizeFunctionHelpers ;
@@ -257,18 +259,18 @@ type InternalResult = {
257259 /**
258260 * - Outputs
259261 */
260- outputs : Array < {
262+ outputs : {
261263 code : string ;
262264 map : RawSourceMap | undefined ;
263- } > ;
265+ } [ ] ;
264266 /**
265267 * - Warnings
266268 */
267- warnings : Array < Warning | WarningObject | string > ;
269+ warnings : ( Warning | WarningObject | string ) [ ] ;
268270 /**
269271 * - Errors
270272 */
271- errors : Array < Error | ErrorObject | string > ;
273+ errors : ( Error | ErrorObject | string ) [ ] ;
272274} ;
273275type Parallel = undefined | boolean | number ;
274276type Rule = RegExp | string ;
0 commit comments