webpack 5.99.4 → 5.99.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/lib/APIPlugin.js +2 -2
  3. package/lib/Cache.js +1 -1
  4. package/lib/Chunk.js +12 -9
  5. package/lib/Compilation.js +36 -27
  6. package/lib/Compiler.js +4 -3
  7. package/lib/ContextModule.js +2 -1
  8. package/lib/HotModuleReplacementPlugin.js +3 -3
  9. package/lib/Module.js +10 -2
  10. package/lib/ModuleFilenameHelpers.js +1 -1
  11. package/lib/ModuleGraph.js +15 -10
  12. package/lib/NormalModule.js +1 -1
  13. package/lib/PrefetchPlugin.js +1 -1
  14. package/lib/RecordIdsPlugin.js +1 -1
  15. package/lib/SourceMapDevToolPlugin.js +1 -1
  16. package/lib/Template.js +1 -1
  17. package/lib/WebpackOptionsApply.js +17 -2
  18. package/lib/buildChunkGraph.js +7 -2
  19. package/lib/cache/IdleFileCachePlugin.js +1 -1
  20. package/lib/cache/MemoryCachePlugin.js +2 -1
  21. package/lib/cache/MemoryWithGcCachePlugin.js +3 -2
  22. package/lib/cache/PackFileCacheStrategy.js +13 -21
  23. package/lib/cache/ResolverCachePlugin.js +14 -16
  24. package/lib/cli.js +3 -3
  25. package/lib/config/defaults.js +2 -2
  26. package/lib/config/target.js +6 -6
  27. package/lib/css/CssParser.js +1 -1
  28. package/lib/debug/ProfilingPlugin.js +1 -1
  29. package/lib/dependencies/ContextDependencyHelpers.js +1 -1
  30. package/lib/dependencies/CssIcssImportDependency.js +3 -2
  31. package/lib/dependencies/HarmonyExportExpressionDependency.js +1 -1
  32. package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +2 -1
  33. package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +1 -1
  34. package/lib/dependencies/JsonExportsDependency.js +1 -1
  35. package/lib/dependencies/LocalModulesHelpers.js +1 -1
  36. package/lib/dependencies/RequireResolveDependency.js +1 -1
  37. package/lib/dependencies/WorkerPlugin.js +2 -2
  38. package/lib/esm/ModuleChunkLoadingPlugin.js +20 -0
  39. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +11 -9
  40. package/lib/ids/DeterministicChunkIdsPlugin.js +1 -1
  41. package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
  42. package/lib/ids/NamedChunkIdsPlugin.js +2 -2
  43. package/lib/ids/NamedModuleIdsPlugin.js +2 -2
  44. package/lib/index.js +1 -1
  45. package/lib/javascript/BasicEvaluatedExpression.js +2 -2
  46. package/lib/javascript/JavascriptParser.js +66 -72
  47. package/lib/library/EnableLibraryPlugin.js +15 -2
  48. package/lib/library/ModuleLibraryPlugin.js +6 -1
  49. package/lib/logging/createConsoleLogger.js +0 -1
  50. package/lib/node/CommonJsChunkLoadingPlugin.js +2 -2
  51. package/lib/node/NodeTemplatePlugin.js +2 -2
  52. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +2 -2
  53. package/lib/node/ReadFileCompileWasmPlugin.js +3 -3
  54. package/lib/optimize/AggressiveMergingPlugin.js +1 -1
  55. package/lib/optimize/SplitChunksPlugin.js +2 -1
  56. package/lib/runtime/GetChunkFilenameRuntimeModule.js +3 -4
  57. package/lib/serialization/BinaryMiddleware.js +22 -38
  58. package/lib/serialization/FileMiddleware.js +29 -33
  59. package/lib/serialization/ObjectMiddleware.js +29 -30
  60. package/lib/serialization/Serializer.js +29 -18
  61. package/lib/serialization/SerializerMiddleware.js +105 -72
  62. package/lib/serialization/SingleItemMiddleware.js +4 -5
  63. package/lib/stats/DefaultStatsFactoryPlugin.js +39 -24
  64. package/lib/stats/DefaultStatsPrinterPlugin.js +267 -80
  65. package/lib/stats/StatsFactory.js +47 -10
  66. package/lib/stats/StatsPrinter.js +52 -31
  67. package/lib/util/ArrayQueue.js +1 -1
  68. package/lib/util/AsyncQueue.js +1 -1
  69. package/lib/util/TupleQueue.js +9 -7
  70. package/lib/util/TupleSet.js +37 -18
  71. package/lib/util/WeakTupleMap.js +50 -37
  72. package/lib/util/cleverMerge.js +2 -2
  73. package/lib/util/comparators.js +1 -1
  74. package/lib/util/createHash.js +1 -1
  75. package/lib/util/fs.js +1 -1
  76. package/lib/util/makeSerializable.js +1 -1
  77. package/lib/util/runtime.js +1 -0
  78. package/lib/util/serialization.js +50 -42
  79. package/lib/wasm-async/AsyncWebAssemblyGenerator.js +1 -1
  80. package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +1 -1
  81. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
  82. package/lib/wasm-sync/WebAssemblyGenerator.js +1 -1
  83. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +1 -1
  84. package/lib/web/FetchCompileWasmPlugin.js +2 -2
  85. package/lib/webpack.js +1 -1
  86. package/package.json +1 -1
  87. package/types.d.ts +125 -74
package/types.d.ts CHANGED
@@ -669,7 +669,15 @@ declare abstract class BasicEvaluatedExpression {
669
669
  /**
670
670
  * Gets the compile-time value of the expression
671
671
  */
672
- asCompileTimeValue(): any;
672
+ asCompileTimeValue():
673
+ | undefined
674
+ | null
675
+ | string
676
+ | number
677
+ | bigint
678
+ | boolean
679
+ | RegExp
680
+ | any[];
673
681
  isTruthy(): boolean;
674
682
  isFalsy(): boolean;
675
683
  isNullish(): undefined | boolean;
@@ -1116,7 +1124,7 @@ declare class Chunk {
1116
1124
  getChildIdsByOrders(
1117
1125
  chunkGraph: ChunkGraph,
1118
1126
  filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean
1119
- ): Record<string, (string | number)[]>;
1127
+ ): Record<string, ChunkId[]>;
1120
1128
  getChildrenOfTypeInOrder(
1121
1129
  chunkGraph: ChunkGraph,
1122
1130
  type: string
@@ -1476,6 +1484,7 @@ declare interface ChunkModuleMaps {
1476
1484
  id: Record<string | number, (string | number)[]>;
1477
1485
  hash: Record<string | number, string>;
1478
1486
  }
1487
+ type ChunkName = null | string;
1479
1488
  declare interface ChunkPathData {
1480
1489
  id: string | number;
1481
1490
  name?: string;
@@ -1987,8 +1996,8 @@ declare class Compilation {
1987
1996
  chunkTemplate: ChunkTemplate;
1988
1997
  runtimeTemplate: RuntimeTemplate;
1989
1998
  moduleTemplates: ModuleTemplates;
1990
- moduleMemCaches?: Map<Module, WeakTupleMap<any, any>>;
1991
- moduleMemCaches2?: Map<Module, WeakTupleMap<any, any>>;
1999
+ moduleMemCaches?: Map<Module, WeakTupleMap<any[], any>>;
2000
+ moduleMemCaches2?: Map<Module, WeakTupleMap<any[], any>>;
1992
2001
  moduleGraph: ModuleGraph;
1993
2002
  chunkGraph: ChunkGraph;
1994
2003
  codeGenerationResults: CodeGenerationResults;
@@ -3073,7 +3082,7 @@ declare interface ContextModuleOptions {
3073
3082
  resource: string | false | string[];
3074
3083
  resourceQuery?: string;
3075
3084
  resourceFragment?: string;
3076
- resolveOptions: any;
3085
+ resolveOptions?: ResolveOptions;
3077
3086
  }
3078
3087
  declare class ContextReplacementPlugin {
3079
3088
  constructor(
@@ -3114,6 +3123,7 @@ type CreateWriteStreamFSImplementation = FSImplementation & {
3114
3123
  write: (...args: any[]) => any;
3115
3124
  close?: (...args: any[]) => any;
3116
3125
  };
3126
+ declare interface CreatedObject<T, F> {}
3117
3127
 
3118
3128
  /**
3119
3129
  * Generator options for css/auto modules.
@@ -3936,8 +3946,9 @@ declare class EnableChunkLoadingPlugin {
3936
3946
  static checkEnabled(compiler: Compiler, type: string): void;
3937
3947
  }
3938
3948
  declare class EnableLibraryPlugin {
3939
- constructor(type: string);
3949
+ constructor(type: string, options?: EnableLibraryPluginOptions);
3940
3950
  type: string;
3951
+ options: EnableLibraryPluginOptions;
3941
3952
 
3942
3953
  /**
3943
3954
  * Apply the plugin
@@ -3946,6 +3957,12 @@ declare class EnableLibraryPlugin {
3946
3957
  static setEnabled(compiler: Compiler, type: string): void;
3947
3958
  static checkEnabled(compiler: Compiler, type: string): void;
3948
3959
  }
3960
+ declare interface EnableLibraryPluginOptions {
3961
+ /**
3962
+ * function that runs when applying the current plugin.
3963
+ */
3964
+ additionalApply?: () => void;
3965
+ }
3949
3966
  declare class EnableWasmLoadingPlugin {
3950
3967
  constructor(type: string);
3951
3968
  type: string;
@@ -4330,6 +4347,7 @@ declare class EvalSourceMapDevToolPlugin {
4330
4347
  */
4331
4348
  apply(compiler: Compiler): void;
4332
4349
  }
4350
+ type ExcludeModulesType = "module" | "chunk" | "root-of-chunk" | "nested";
4333
4351
  declare interface ExecuteModuleArgument {
4334
4352
  module: Module;
4335
4353
  moduleObject?: ExecuteModuleObject;
@@ -7043,7 +7061,6 @@ declare class JavascriptParser extends Parser {
7043
7061
  )[],
7044
7062
  fn: () => void
7045
7063
  ): void;
7046
- inExecutedPath(state: boolean, fn: () => void): void;
7047
7064
  inClassScope(hasThis: boolean, params: Identifier[], fn: () => void): void;
7048
7065
  inFunctionScope(
7049
7066
  hasThis: boolean,
@@ -7758,7 +7775,7 @@ declare interface KnownNormalizedStatsOptions {
7758
7775
  excludeModules: ((
7759
7776
  name: string,
7760
7777
  module: StatsModule,
7761
- type: "module" | "chunk" | "root-of-chunk" | "nested"
7778
+ type: ExcludeModulesType
7762
7779
  ) => boolean)[];
7763
7780
  warningsFilter: ((warning: StatsError, textValue: string) => boolean)[];
7764
7781
  cachedModules: boolean;
@@ -7792,12 +7809,12 @@ declare interface KnownStatsAsset {
7792
7809
  comparedForEmit: boolean;
7793
7810
  cached: boolean;
7794
7811
  related?: StatsAsset[];
7795
- chunkNames?: (string | number)[];
7796
- chunkIdHints?: (string | number)[];
7797
- chunks?: (string | number)[];
7798
- auxiliaryChunkNames?: (string | number)[];
7799
- auxiliaryChunks?: (string | number)[];
7800
- auxiliaryChunkIdHints?: (string | number)[];
7812
+ chunks?: ChunkId[];
7813
+ chunkNames?: ChunkName[];
7814
+ chunkIdHints?: string[];
7815
+ auxiliaryChunks?: ChunkId[];
7816
+ auxiliaryChunkNames?: ChunkName[];
7817
+ auxiliaryChunkIdHints?: string[];
7801
7818
  filteredRelated?: number;
7802
7819
  isOverSizeLimit?: boolean;
7803
7820
  }
@@ -7815,7 +7832,7 @@ declare interface KnownStatsChunk {
7815
7832
  files: string[];
7816
7833
  auxiliaryFiles: string[];
7817
7834
  hash: string;
7818
- childrenByOrder: Record<string, (string | number)[]>;
7835
+ childrenByOrder: Record<string, ChunkId[]>;
7819
7836
  id?: string | number;
7820
7837
  siblings?: (string | number)[];
7821
7838
  parents?: (string | number)[];
@@ -7846,7 +7863,7 @@ declare interface KnownStatsChunkOrigin {
7846
7863
  moduleId?: string | number;
7847
7864
  }
7848
7865
  declare interface KnownStatsCompilation {
7849
- env?: any;
7866
+ env?: Record<string, any>;
7850
7867
  name?: string;
7851
7868
  hash?: string;
7852
7869
  version?: string;
@@ -7869,6 +7886,8 @@ declare interface KnownStatsCompilation {
7869
7886
  warningsCount?: number;
7870
7887
  children?: StatsCompilation[];
7871
7888
  logging?: Record<string, StatsLogging>;
7889
+ filteredWarningDetailsCount?: number;
7890
+ filteredErrorDetailsCount?: number;
7872
7891
  }
7873
7892
  declare interface KnownStatsError {
7874
7893
  message: string;
@@ -7937,7 +7956,7 @@ declare interface KnownStatsModule {
7937
7956
  dependent?: boolean;
7938
7957
  issuer?: null | string;
7939
7958
  issuerName?: null | string;
7940
- issuerPath?: StatsModuleIssuer[];
7959
+ issuerPath?: null | StatsModuleIssuer[];
7941
7960
  failed?: boolean;
7942
7961
  errors?: number;
7943
7962
  warnings?: number;
@@ -7983,13 +8002,13 @@ declare interface KnownStatsModuleTraceItem {
7983
8002
  originId?: string | number;
7984
8003
  moduleId?: string | number;
7985
8004
  }
7986
- declare interface KnownStatsPrinterColorFn {
7987
- bold?: (str: string) => string;
7988
- yellow?: (str: string) => string;
7989
- red?: (str: string) => string;
7990
- green?: (str: string) => string;
7991
- magenta?: (str: string) => string;
7992
- cyan?: (str: string) => string;
8005
+ declare interface KnownStatsPrinterColorFunctions {
8006
+ bold?: (value: string | number) => string;
8007
+ yellow?: (value: string | number) => string;
8008
+ red?: (value: string | number) => string;
8009
+ green?: (value: string | number) => string;
8010
+ magenta?: (value: string | number) => string;
8011
+ cyan?: (value: string | number) => string;
7993
8012
  }
7994
8013
  declare interface KnownStatsPrinterContext {
7995
8014
  type?: string;
@@ -8174,6 +8193,20 @@ declare interface LazyCompilationOptions {
8174
8193
  */
8175
8194
  test?: string | RegExp | ((module: Module) => boolean);
8176
8195
  }
8196
+ type LazyFunction<
8197
+ InputValue,
8198
+ OutputValue,
8199
+ InternalLazyTarget extends SerializerMiddleware<
8200
+ any,
8201
+ any,
8202
+ Record<string, any>
8203
+ >,
8204
+ InternalLazyOptions extends undefined | LazyOptions
8205
+ > = (() => InputValue | Promise<InputValue>) &
8206
+ Partial<{ options: InternalLazyOptions }>;
8207
+ declare interface LazyOptions {
8208
+ [index: string]: any;
8209
+ }
8177
8210
  declare class LazySet<T> {
8178
8211
  constructor(iterable?: Iterable<T>);
8179
8212
  get size(): number;
@@ -9341,14 +9374,20 @@ declare class ModuleGraph {
9341
9374
  getMetaIfExisting(thing: object): any;
9342
9375
  freeze(cacheStage?: string): void;
9343
9376
  unfreeze(): void;
9344
- cached<T, V>(
9345
- fn: (moduleGraph: ModuleGraph, ...args: T[]) => V,
9377
+ cached<T, R>(
9378
+ fn: (moduleGraph: ModuleGraph, ...args: T[]) => R,
9346
9379
  ...args: T[]
9347
- ): V;
9380
+ ): R;
9348
9381
  setModuleMemCaches(
9349
- moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
9382
+ moduleMemCaches: Map<Module, WeakTupleMap<any[], any>>
9350
9383
  ): void;
9351
- dependencyCacheProvide(dependency: Dependency, ...args: any[]): any;
9384
+ dependencyCacheProvide<D extends Dependency, ARGS extends any[], R>(
9385
+ dependency: D,
9386
+ ...args: [
9387
+ ARGS,
9388
+ ...((moduleGraph: ModuleGraph, dependency: D, ...args: ARGS) => R)[]
9389
+ ]
9390
+ ): R;
9352
9391
  static getModuleGraphForModule(
9353
9392
  module: Module,
9354
9393
  deprecateMessage: string,
@@ -9414,7 +9453,7 @@ type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
9414
9453
  declare interface ModuleMemCachesItem {
9415
9454
  buildInfo: BuildInfo;
9416
9455
  references?: WeakMap<Dependency, Module>;
9417
- memCache: WeakTupleMap<Module[], string>;
9456
+ memCache: WeakTupleMap<any[], any>;
9418
9457
  }
9419
9458
 
9420
9459
  /**
@@ -10254,7 +10293,7 @@ declare class NullDependencyTemplate extends DependencyTemplate {
10254
10293
  }
10255
10294
  declare interface ObjectDeserializerContext {
10256
10295
  read: () => any;
10257
- setCircularReference: (value?: any) => void;
10296
+ setCircularReference: (value: ReferenceableItem) => void;
10258
10297
  }
10259
10298
  declare interface ObjectEncodingOptions {
10260
10299
  encoding?:
@@ -10281,11 +10320,14 @@ declare interface ObjectSerializer {
10281
10320
  }
10282
10321
  declare interface ObjectSerializerContext {
10283
10322
  write: (value?: any) => void;
10284
- setCircularReference: (value?: any) => void;
10323
+ setCircularReference: (value: ReferenceableItem) => void;
10285
10324
  snapshot: () => ObjectSerializerSnapshot;
10286
10325
  rollback: (snapshot: ObjectSerializerSnapshot) => void;
10287
10326
  writeLazy?: (item?: any) => void;
10288
- writeSeparate?: (item?: any, obj?: any) => () => any;
10327
+ writeSeparate?: (
10328
+ item: any,
10329
+ obj?: LazyOptions
10330
+ ) => LazyFunction<any, any, any, LazyOptions>;
10289
10331
  }
10290
10332
  declare interface ObjectSerializerSnapshot {
10291
10333
  length: number;
@@ -11615,7 +11657,7 @@ declare interface PreparsedAst {
11615
11657
  }
11616
11658
  declare interface PrintedElement {
11617
11659
  element: string;
11618
- content: string;
11660
+ content?: string;
11619
11661
  }
11620
11662
  declare interface Problem {
11621
11663
  type: ProblemType;
@@ -11640,7 +11682,7 @@ declare class Profiler {
11640
11682
  inspector: any;
11641
11683
  hasSession(): boolean;
11642
11684
  startProfiling(): Promise<void> | Promise<[any, any, any]>;
11643
- sendCommand(method: string, params: Record<string, any>): Promise<any>;
11685
+ sendCommand(method: string, params?: Record<string, any>): Promise<any>;
11644
11686
  destroy(): Promise<void>;
11645
11687
  stopProfiling(): Promise<{ profile: any }>;
11646
11688
  }
@@ -12446,6 +12488,7 @@ type RecursiveArrayOrRecord<T> =
12446
12488
  | { [index: string]: RecursiveArrayOrRecord<T> }
12447
12489
  | RecursiveArrayOrRecord<T>[]
12448
12490
  | T;
12491
+ type ReferenceableItem = string | object;
12449
12492
  declare interface ReferencedExport {
12450
12493
  /**
12451
12494
  * name of the referenced export
@@ -14189,31 +14232,36 @@ declare interface ScopeInfo {
14189
14232
  inTry: boolean;
14190
14233
  isStrict: boolean;
14191
14234
  isAsmJs: boolean;
14192
-
14193
- /**
14194
- * false for unknown state
14195
- */
14196
- inExecutedPath: boolean;
14197
- terminated?: "return" | "throw";
14235
+ terminated?: 1 | 2;
14198
14236
  }
14199
14237
  declare interface Selector<A, B> {
14200
14238
  (input: A): undefined | null | B;
14201
14239
  }
14202
- declare abstract class Serializer {
14203
- serializeMiddlewares: SerializerMiddleware<any, any>[];
14204
- deserializeMiddlewares: SerializerMiddleware<any, any>[];
14205
- context: any;
14206
- serialize(obj?: any, context?: any): Promise<any>;
14207
- deserialize(value?: any, context?: any): Promise<any>;
14208
- }
14209
- declare abstract class SerializerMiddleware<DeserializedType, SerializedType> {
14240
+ declare abstract class Serializer<DeserializedValue, SerializedValue, Context> {
14241
+ serializeMiddlewares: SerializerMiddleware<any, any, any>[];
14242
+ deserializeMiddlewares: SerializerMiddleware<any, any, any>[];
14243
+ context?: Context;
14244
+ serialize<ExtendedContext>(
14245
+ obj: DeserializedValue | Promise<DeserializedValue>,
14246
+ context: Context & ExtendedContext
14247
+ ): Promise<SerializedValue>;
14248
+ deserialize<ExtendedContext>(
14249
+ value: SerializedValue | Promise<SerializedValue>,
14250
+ context: Context & ExtendedContext
14251
+ ): Promise<DeserializedValue>;
14252
+ }
14253
+ declare abstract class SerializerMiddleware<
14254
+ DeserializedType,
14255
+ SerializedType,
14256
+ Context
14257
+ > {
14210
14258
  serialize(
14211
14259
  data: DeserializedType,
14212
- context?: any
14260
+ context: Context
14213
14261
  ): null | SerializedType | Promise<SerializedType>;
14214
14262
  deserialize(
14215
14263
  data: SerializedType,
14216
- context?: any
14264
+ context: Context
14217
14265
  ): DeserializedType | Promise<DeserializedType>;
14218
14266
  }
14219
14267
  declare class SharePlugin {
@@ -14841,11 +14889,11 @@ type StatsCompilation = KnownStatsCompilation & Record<string, any>;
14841
14889
  type StatsError = KnownStatsError & Record<string, any>;
14842
14890
  declare abstract class StatsFactory {
14843
14891
  hooks: StatsFactoryHooks;
14844
- create(
14892
+ create<FactoryData, FallbackCreatedObject>(
14845
14893
  type: string,
14846
- data: any,
14894
+ data: FactoryData,
14847
14895
  baseContext: Omit<StatsFactoryContext, "type">
14848
- ): any;
14896
+ ): CreatedObject<FactoryData, FallbackCreatedObject>;
14849
14897
  }
14850
14898
  type StatsFactoryContext = KnownStatsFactoryContext & Record<string, any>;
14851
14899
  declare interface StatsFactoryHooks {
@@ -15342,23 +15390,32 @@ declare interface StatsOptions {
15342
15390
  declare interface StatsPrintHooks {
15343
15391
  sortElements: HookMap<SyncBailHook<[string[], StatsPrinterContext], void>>;
15344
15392
  printElements: HookMap<
15345
- SyncBailHook<[PrintedElement[], StatsPrinterContext], string | void>
15393
+ SyncBailHook<
15394
+ [PrintedElement[], StatsPrinterContext],
15395
+ undefined | string | void
15396
+ >
15346
15397
  >;
15347
15398
  sortItems: HookMap<
15348
15399
  SyncBailHook<[any[], StatsPrinterContext], boolean | void>
15349
15400
  >;
15350
15401
  getItemName: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
15351
15402
  printItems: HookMap<
15352
- SyncBailHook<[string[], StatsPrinterContext], string | void>
15403
+ SyncBailHook<[string[], StatsPrinterContext], undefined | string>
15404
+ >;
15405
+ print: HookMap<
15406
+ SyncBailHook<[any, StatsPrinterContext], undefined | string | void>
15353
15407
  >;
15354
- print: HookMap<SyncBailHook<[any, StatsPrinterContext], string | void>>;
15355
15408
  result: HookMap<SyncWaterfallHook<[string, StatsPrinterContext]>>;
15356
15409
  }
15357
15410
  declare abstract class StatsPrinter {
15358
15411
  hooks: StatsPrintHooks;
15359
- print(type: string, object?: any, baseContext?: StatsPrinterContext): string;
15412
+ print(
15413
+ type: string,
15414
+ object?: any,
15415
+ baseContext?: StatsPrinterContext
15416
+ ): undefined | string;
15360
15417
  }
15361
- type StatsPrinterContext = KnownStatsPrinterColorFn &
15418
+ type StatsPrinterContext = KnownStatsPrinterColorFunctions &
15362
15419
  KnownStatsPrinterFormatters &
15363
15420
  KnownStatsPrinterContext &
15364
15421
  Record<string, any>;
@@ -15414,12 +15471,6 @@ declare const TRANSITIVE_ONLY: unique symbol;
15414
15471
  declare interface TagData {
15415
15472
  [index: string]: any;
15416
15473
  }
15417
-
15418
- /**
15419
- * Helper function for joining two ranges into a single range. This is useful
15420
- * when working with AST nodes, as it allows you to combine the ranges of child nodes
15421
- * to create the range of the _parent node_.
15422
- */
15423
15474
  declare interface TagInfo {
15424
15475
  tag: symbol;
15425
15476
  data?: TagData;
@@ -15676,12 +15727,12 @@ declare abstract class Watching {
15676
15727
  resume(): void;
15677
15728
  close(callback: CallbackFunction_1<void>): void;
15678
15729
  }
15679
- declare abstract class WeakTupleMap<T extends any[], V> {
15680
- set(...args: [T, ...V[]]): void;
15681
- has(...args: T): boolean;
15682
- get(...args: T): undefined | V;
15683
- provide(...args: [T, ...(() => V)[]]): V;
15684
- delete(...args: T): void;
15730
+ declare abstract class WeakTupleMap<K extends any[], V> {
15731
+ set(...args: [K, ...V[]]): void;
15732
+ has(...args: K): boolean;
15733
+ get(...args: K): undefined | V;
15734
+ provide(...args: [K, ...((...args: K) => V)[]]): V;
15735
+ delete(...args: K): void;
15685
15736
  clear(): void;
15686
15737
  }
15687
15738
  declare interface WebAssemblyRenderContext {
@@ -16648,11 +16699,11 @@ declare namespace exports {
16648
16699
  ) => void;
16649
16700
  export const registerNotSerializable: (Constructor: Constructor) => void;
16650
16701
  export const NOT_SERIALIZABLE: object;
16651
- export const buffersSerializer: Serializer;
16652
- export let createFileSerializer: (
16702
+ export const buffersSerializer: Serializer<any, any, any>;
16703
+ export let createFileSerializer: <D, S, C>(
16653
16704
  fs: IntermediateFileSystem,
16654
16705
  hashFunction: string | typeof Hash
16655
- ) => Serializer;
16706
+ ) => Serializer<D, S, C>;
16656
16707
  export { MEASURE_START_OPERATION, MEASURE_END_OPERATION };
16657
16708
  }
16658
16709
  export const cleverMerge: <T, O>(