@@ -80,12 +80,13 @@ export type MinimizeFunctionHelpers = {
8080} ;
8181export type MinimizerImplementation < T > = BasicMinimizerImplementation < T > &
8282 MinimizeFunctionHelpers ;
83+ export type Parallel = undefined | boolean | number ;
8384export type BasePluginOptions = {
8485 test ?: Rules | undefined ;
8586 include ?: Rules | undefined ;
8687 exclude ?: Rules | undefined ;
8788 extractComments ?: ExtractCommentsOptions | undefined ;
88- parallel ?: boolean | undefined ;
89+ parallel ?: Parallel ;
8990} ;
9091export type InferDefaultType < T > = T extends infer U
9192 ? U
@@ -188,13 +189,16 @@ export type DefinedDefaultMinimizerAndOptions<T> =
188189 * @template T
189190 * @typedef {BasicMinimizerImplementation<T> & MinimizeFunctionHelpers } MinimizerImplementation
190191 */
192+ /**
193+ * @typedef {undefined | boolean | number } Parallel
194+ */
191195/**
192196 * @typedef {Object } BasePluginOptions
193197 * @property {Rules } [test]
194198 * @property {Rules } [include]
195199 * @property {Rules } [exclude]
196200 * @property {ExtractCommentsOptions } [extractComments]
197- * @property {boolean } [parallel]
201+ * @property {Parallel } [parallel]
198202 */
199203/**
200204 * @template T
@@ -232,7 +236,7 @@ declare class TerserPlugin<T = TerserOptions> {
232236 private static buildError ;
233237 /**
234238 * @private
235- * @param {boolean | undefined } parallel
239+ * @param {Parallel } parallel
236240 * @returns {number }
237241 */
238242 private static getAvailableNumberOfCores ;
@@ -253,7 +257,7 @@ declare class TerserPlugin<T = TerserOptions> {
253257 options : {
254258 test : Rules ;
255259 extractComments : ExtractCommentsOptions ;
256- parallel : boolean ;
260+ parallel : number | boolean ;
257261 include : Rules | undefined ;
258262 exclude : Rules | undefined ;
259263 minimizer : {
0 commit comments