@@ -93,6 +93,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
9393/** @typedef {KnownStatsCompilation & Record<string, StatsJsonValue> } StatsCompilation */
9494/**
9595 * Defines the known stats compilation type used by this module.
96+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsCompilation { myField?: MyType } }`.
97+ * @augmentable
9698 * @typedef {object } KnownStatsCompilation
9799 * @property {StatsJsonValue= } env
98100 * @property {string= } name
@@ -126,6 +128,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
126128/** @typedef {KnownStatsLogging & Record<string, StatsJsonValue> } StatsLogging */
127129/**
128130 * Defines the known stats logging type used by this module.
131+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsLogging { myField?: MyType } }`.
132+ * @augmentable
129133 * @typedef {object } KnownStatsLogging
130134 * @property {StatsLoggingEntry[] } entries
131135 * @property {number } filteredEntries
@@ -135,6 +139,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
135139/** @typedef {KnownStatsLoggingEntry & Record<string, StatsJsonValue> } StatsLoggingEntry */
136140/**
137141 * Defines the known stats logging entry type used by this module.
142+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsLoggingEntry { myField?: MyType } }`.
143+ * @augmentable
138144 * @typedef {object } KnownStatsLoggingEntry
139145 * @property {string } type
140146 * @property {string= } message
@@ -148,6 +154,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
148154/** @typedef {string[] } ChunkIdHints */
149155/**
150156 * Defines the known stats asset type used by this module.
157+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsAsset { myField?: MyType } }`.
158+ * @augmentable
151159 * @typedef {object } KnownStatsAsset
152160 * @property {string } type
153161 * @property {string } name
@@ -171,6 +179,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
171179
172180/**
173181 * A group of assets that `groupResults` creates, listing them in `children` or counting hidden ones in `filteredChildren`.
182+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsAssetGroup { myField?: MyType } }`.
183+ * @augmentable
174184 * @typedef {object } KnownStatsAssetGroup
175185 * @property {string } type
176186 * @property {number } size
@@ -182,6 +192,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
182192/** @typedef {KnownStatsChunkGroup & Record<string, StatsJsonValue> } StatsChunkGroup */
183193/**
184194 * Defines the known stats chunk group type used by this module.
195+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsChunkGroup { myField?: MyType } }`.
196+ * @augmentable
185197 * @typedef {object } KnownStatsChunkGroup
186198 * @property {ChunkName= } name
187199 * @property {ChunkId[]= } chunks
@@ -200,6 +212,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
200212/** @typedef {KnownStatsModule & Record<string, StatsJsonValue> } StatsModule */
201213/**
202214 * Defines the known stats module type used by this module.
215+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModule { myField?: MyType } }`.
216+ * @augmentable
203217 * @typedef {object } KnownStatsModule
204218 * @property {string= } type
205219 * @property {string= } moduleType
@@ -246,6 +260,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
246260/** @typedef {KnownStatsProfile & Record<string, StatsJsonValue> } StatsProfile */
247261/**
248262 * Defines the known stats profile type used by this module.
263+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsProfile { myField?: MyType } }`.
264+ * @augmentable
249265 * @typedef {object } KnownStatsProfile
250266 * @property {number } total
251267 * @property {number } resolving
@@ -262,6 +278,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
262278/** @typedef {KnownStatsModuleIssuer & Record<string, StatsJsonValue> } StatsModuleIssuer */
263279/**
264280 * Defines the known stats module issuer type used by this module.
281+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModuleIssuer { myField?: MyType } }`.
282+ * @augmentable
265283 * @typedef {object } KnownStatsModuleIssuer
266284 * @property {string } identifier
267285 * @property {string } name
@@ -273,6 +291,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
273291
274292/**
275293 * A group of modules that `groupResults` creates, listing them in `children` or counting hidden ones in `filteredChildren`.
294+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModuleGroup { myField?: MyType } }`.
295+ * @augmentable
276296 * @typedef {object } KnownStatsModuleGroup
277297 * @property {string } type
278298 * @property {number } size
@@ -288,6 +308,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
288308
289309/**
290310 * A group of reasons from one origin module that `groupResults` creates.
311+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModuleReasonGroup { myField?: MyType } }`.
312+ * @augmentable
291313 * @typedef {object } KnownStatsModuleReasonGroup
292314 * @property {string } type
293315 * @property {string } module
@@ -298,6 +320,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
298320/** @typedef {KnownStatsModuleReason & Record<string, StatsJsonValue> } StatsModuleReason */
299321/**
300322 * Defines the known stats module reason type used by this module.
323+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModuleReason { myField?: MyType } }`.
324+ * @augmentable
301325 * @typedef {object } KnownStatsModuleReason
302326 * @property {string | null } moduleIdentifier
303327 * @property {string | null } module
@@ -316,6 +340,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
316340/** @typedef {KnownStatsChunk & Record<string, StatsJsonValue> } StatsChunk */
317341/**
318342 * Defines the known stats chunk type used by this module.
343+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsChunk { myField?: MyType } }`.
344+ * @augmentable
319345 * @typedef {object } KnownStatsChunk
320346 * @property {boolean } rendered
321347 * @property {boolean } initial
@@ -343,6 +369,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
343369/** @typedef {KnownStatsChunkOrigin & Record<string, StatsJsonValue> } StatsChunkOrigin */
344370/**
345371 * Defines the known stats chunk origin type used by this module.
372+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsChunkOrigin { myField?: MyType } }`.
373+ * @augmentable
346374 * @typedef {object } KnownStatsChunkOrigin
347375 * @property {string } module
348376 * @property {string } moduleIdentifier
@@ -355,6 +383,8 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
355383/** @typedef {KnownStatsModuleTraceItem & Record<string, StatsJsonValue> } StatsModuleTraceItem */
356384/**
357385 * Defines the known stats module trace item type used by this module.
386+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModuleTraceItem { myField?: MyType } }`.
387+ * @augmentable
358388 * @typedef {object } KnownStatsModuleTraceItem
359389 * @property {string= } originIdentifier
360390 * @property {string= } originName
@@ -368,13 +398,17 @@ const { makePathsRelative, parseResource } = require("../util/identifier");
368398/** @typedef {KnownStatsModuleTraceDependency & Record<string, StatsJsonValue> } StatsModuleTraceDependency */
369399/**
370400 * Defines the known stats module trace dependency type used by this module.
401+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsModuleTraceDependency { myField?: MyType } }`.
402+ * @augmentable
371403 * @typedef {object } KnownStatsModuleTraceDependency
372404 * @property {string= } loc
373405 */
374406
375407/** @typedef {KnownStatsError & Record<string, StatsJsonValue> } StatsError */
376408/**
377409 * Defines the known stats error type used by this module.
410+ * A plugin types its own stats fields by declaration merging: `declare module "webpack" { interface KnownStatsError { myField?: MyType } }`.
411+ * @augmentable
378412 * @typedef {object } KnownStatsError
379413 * @property {string } message
380414 * @property {string= } chunkName
0 commit comments