webpack 5.97.1 → 5.99.0
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.
- package/README.md +345 -392
- package/lib/AsyncDependenciesBlock.js +3 -1
- package/lib/BannerPlugin.js +1 -1
- package/lib/Cache.js +9 -7
- package/lib/CacheFacade.js +5 -5
- package/lib/Chunk.js +2 -2
- package/lib/ChunkGraph.js +21 -16
- package/lib/ChunkTemplate.js +6 -6
- package/lib/CleanPlugin.js +10 -10
- package/lib/CodeGenerationResults.js +4 -3
- package/lib/CompatibilityPlugin.js +4 -1
- package/lib/Compilation.js +343 -167
- package/lib/Compiler.js +13 -18
- package/lib/ConditionalInitFragment.js +1 -1
- package/lib/ConstPlugin.js +5 -3
- package/lib/ContextModule.js +4 -2
- package/lib/ContextModuleFactory.js +3 -3
- package/lib/ContextReplacementPlugin.js +43 -16
- package/lib/DefinePlugin.js +25 -24
- package/lib/DelegatedModule.js +4 -2
- package/lib/DelegatedModuleFactoryPlugin.js +2 -1
- package/lib/Dependency.js +19 -13
- package/lib/DependencyTemplates.js +4 -3
- package/lib/DllModule.js +4 -2
- package/lib/DllModuleFactory.js +2 -2
- package/lib/DllReferencePlugin.js +2 -1
- package/lib/DynamicEntryPlugin.js +1 -1
- package/lib/EnvironmentPlugin.js +4 -2
- package/lib/ExportsInfo.js +72 -40
- package/lib/ExternalModule.js +14 -5
- package/lib/ExternalModuleFactoryPlugin.js +24 -12
- package/lib/FileSystemInfo.js +129 -94
- package/lib/FlagDependencyExportsPlugin.js +6 -4
- package/lib/FlagDependencyUsagePlugin.js +1 -1
- package/lib/Generator.js +29 -1
- package/lib/HookWebpackError.js +2 -2
- package/lib/HotModuleReplacementPlugin.js +3 -9
- package/lib/IgnoreErrorModuleFactory.js +2 -2
- package/lib/IgnorePlugin.js +0 -5
- package/lib/InitFragment.js +1 -1
- package/lib/LoaderOptionsPlugin.js +8 -5
- package/lib/MainTemplate.js +7 -7
- package/lib/Module.js +44 -21
- package/lib/ModuleBuildError.js +3 -1
- package/lib/ModuleDependencyError.js +4 -3
- package/lib/ModuleDependencyWarning.js +4 -3
- package/lib/ModuleFactory.js +9 -3
- package/lib/ModuleFilenameHelpers.js +21 -39
- package/lib/ModuleGraph.js +20 -14
- package/lib/ModuleGraphConnection.js +7 -13
- package/lib/ModuleNotFoundError.js +1 -1
- package/lib/ModuleParseError.js +2 -1
- package/lib/ModuleSourceTypesConstants.js +11 -0
- package/lib/ModuleTemplate.js +5 -5
- package/lib/ModuleTypeConstants.js +15 -0
- package/lib/MultiCompiler.js +4 -4
- package/lib/MultiStats.js +1 -1
- package/lib/NormalModule.js +101 -54
- package/lib/NormalModuleFactory.js +38 -33
- package/lib/NormalModuleReplacementPlugin.js +3 -2
- package/lib/NullFactory.js +2 -2
- package/lib/Parser.js +4 -3
- package/lib/ProgressPlugin.js +1 -2
- package/lib/RawModule.js +4 -2
- package/lib/RecordIdsPlugin.js +6 -2
- package/lib/RequestShortener.js +3 -1
- package/lib/ResolverFactory.js +12 -9
- package/lib/RuntimeModule.js +4 -2
- package/lib/RuntimeTemplate.js +2 -1
- package/lib/SelfModuleFactory.js +2 -2
- package/lib/SourceMapDevToolPlugin.js +0 -8
- package/lib/Template.js +6 -5
- package/lib/TemplatedPathPlugin.js +15 -12
- package/lib/WebpackOptionsApply.js +1 -1
- package/lib/asset/AssetGenerator.js +237 -170
- package/lib/asset/AssetModulesPlugin.js +52 -10
- package/lib/asset/AssetSourceGenerator.js +18 -0
- package/lib/asset/RawDataUrlModule.js +4 -2
- package/lib/buildChunkGraph.js +14 -4
- package/lib/cache/MemoryWithGcCachePlugin.js +6 -2
- package/lib/cache/PackFileCacheStrategy.js +137 -121
- package/lib/cache/ResolverCachePlugin.js +15 -7
- package/lib/cache/getLazyHashedEtag.js +4 -3
- package/lib/cli.js +23 -15
- package/lib/config/defaults.js +104 -28
- package/lib/config/normalization.js +14 -13
- package/lib/config/target.js +8 -8
- package/lib/container/ContainerEntryModule.js +4 -2
- package/lib/container/ContainerEntryModuleFactory.js +2 -2
- package/lib/container/FallbackModule.js +4 -2
- package/lib/container/FallbackModuleFactory.js +2 -2
- package/lib/container/RemoteModule.js +4 -2
- package/lib/container/options.js +5 -5
- package/lib/css/CssGenerator.js +71 -9
- package/lib/css/CssLoadingRuntimeModule.js +5 -2
- package/lib/css/CssModulesPlugin.js +41 -9
- package/lib/css/CssParser.js +37 -17
- package/lib/css/walkCssTokens.js +17 -17
- package/lib/debug/ProfilingPlugin.js +98 -38
- package/lib/dependencies/AMDDefineDependencyParserPlugin.js +10 -4
- package/lib/dependencies/AMDPlugin.js +5 -2
- package/lib/dependencies/AMDRequireArrayDependency.js +4 -3
- package/lib/dependencies/AMDRequireContextDependency.js +2 -1
- package/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +15 -7
- package/lib/dependencies/AMDRuntimeModules.js +3 -1
- package/lib/dependencies/CommonJsExportRequireDependency.js +4 -5
- package/lib/dependencies/CommonJsExportsParserPlugin.js +3 -3
- package/lib/dependencies/CommonJsImportsParserPlugin.js +38 -7
- package/lib/dependencies/CommonJsRequireContextDependency.js +2 -1
- package/lib/dependencies/ContextDependencyHelpers.js +13 -6
- package/lib/dependencies/CssIcssExportDependency.js +15 -12
- package/lib/dependencies/CssIcssImportDependency.js +4 -1
- package/lib/dependencies/CssLocalIdentifierDependency.js +18 -15
- package/lib/dependencies/ExportsInfoDependency.js +6 -1
- package/lib/dependencies/HarmonyEvaluatedImportSpecifierDependency.js +5 -5
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +22 -15
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +23 -8
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +2 -2
- package/lib/dependencies/HarmonyImportDependency.js +8 -6
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +19 -14
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +5 -5
- package/lib/dependencies/ImportContextDependency.js +2 -1
- package/lib/dependencies/ImportMetaContextDependencyParserPlugin.js +8 -4
- package/lib/dependencies/JsonExportsDependency.js +49 -27
- package/lib/dependencies/LoaderPlugin.js +4 -14
- package/lib/dependencies/RequireContextDependency.js +2 -1
- package/lib/dependencies/RequireContextDependencyParserPlugin.js +6 -3
- package/lib/dependencies/RequireEnsureDependenciesBlock.js +3 -2
- package/lib/dependencies/RequireEnsureDependenciesBlockParserPlugin.js +11 -5
- package/lib/dependencies/RequireResolveContextDependency.js +1 -1
- package/lib/dependencies/WebAssemblyExportImportedDependency.js +1 -1
- package/lib/dependencies/WorkerDependency.js +6 -3
- package/lib/dependencies/WorkerPlugin.js +100 -41
- package/lib/esm/ModuleChunkFormatPlugin.js +5 -0
- package/lib/esm/ModuleChunkLoadingRuntimeModule.js +3 -2
- package/lib/hmr/HotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/JavascriptHotModuleReplacement.runtime.js +1 -0
- package/lib/hmr/LazyCompilationPlugin.js +32 -24
- package/lib/hmr/lazyCompilationBackend.js +1 -1
- package/lib/ids/DeterministicModuleIdsPlugin.js +1 -1
- package/lib/ids/HashedModuleIdsPlugin.js +2 -1
- package/lib/ids/IdHelpers.js +15 -14
- package/lib/ids/SyncModuleIdsPlugin.js +9 -5
- package/lib/index.js +5 -5
- package/lib/javascript/BasicEvaluatedExpression.js +6 -6
- package/lib/javascript/JavascriptGenerator.js +11 -1
- package/lib/javascript/JavascriptModulesPlugin.js +54 -34
- package/lib/javascript/JavascriptParser.js +272 -188
- package/lib/javascript/JavascriptParserHelpers.js +10 -9
- package/lib/javascript/StartupHelpers.js +4 -1
- package/lib/json/JsonData.js +4 -4
- package/lib/json/JsonGenerator.js +54 -22
- package/lib/json/JsonModulesPlugin.js +16 -3
- package/lib/json/JsonParser.js +10 -4
- package/lib/library/AbstractLibraryPlugin.js +7 -3
- package/lib/library/AssignLibraryPlugin.js +29 -1
- package/lib/library/EnableLibraryPlugin.js +7 -10
- package/lib/library/ExportPropertyLibraryPlugin.js +4 -1
- package/lib/library/ModuleLibraryPlugin.js +121 -15
- package/lib/logging/Logger.js +2 -2
- package/lib/logging/createConsoleLogger.js +4 -4
- package/lib/node/NodeEnvironmentPlugin.js +6 -2
- package/lib/node/ReadFileCompileAsyncWasmPlugin.js +1 -2
- package/lib/node/ReadFileCompileWasmPlugin.js +1 -2
- package/lib/node/nodeConsole.js +3 -1
- package/lib/optimize/AggressiveSplittingPlugin.js +1 -1
- package/lib/optimize/ConcatenatedModule.js +19 -12
- package/lib/optimize/InnerGraph.js +3 -2
- package/lib/optimize/InnerGraphPlugin.js +13 -7
- package/lib/optimize/LimitChunkCountPlugin.js +20 -0
- package/lib/optimize/ModuleConcatenationPlugin.js +10 -7
- package/lib/optimize/RealContentHashPlugin.js +8 -4
- package/lib/optimize/SideEffectsFlagPlugin.js +4 -2
- package/lib/optimize/SplitChunksPlugin.js +90 -65
- package/lib/rules/BasicEffectRulePlugin.js +9 -1
- package/lib/rules/BasicMatcherRulePlugin.js +15 -4
- package/lib/rules/ObjectMatcherRulePlugin.js +12 -3
- package/lib/rules/RuleSetCompiler.js +25 -14
- package/lib/rules/UseEffectRulePlugin.js +47 -17
- package/lib/runtime/AutoPublicPathRuntimeModule.js +1 -1
- package/lib/runtime/GetChunkFilenameRuntimeModule.js +6 -6
- package/lib/schemes/HttpUriPlugin.js +38 -17
- package/lib/serialization/BinaryMiddleware.js +52 -19
- package/lib/serialization/FileMiddleware.js +78 -48
- package/lib/serialization/ObjectMiddleware.js +78 -29
- package/lib/serialization/PlainObjectSerializer.js +1 -1
- package/lib/serialization/Serializer.js +15 -10
- package/lib/serialization/SerializerMiddleware.js +80 -41
- package/lib/serialization/SingleItemMiddleware.js +10 -7
- package/lib/serialization/types.js +1 -1
- package/lib/sharing/ConsumeSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedModule.js +4 -2
- package/lib/sharing/ProvideSharedModuleFactory.js +5 -3
- package/lib/sharing/utils.js +2 -2
- package/lib/stats/DefaultStatsFactoryPlugin.js +81 -79
- package/lib/stats/DefaultStatsPresetPlugin.js +43 -23
- package/lib/stats/DefaultStatsPrinterPlugin.js +85 -43
- package/lib/stats/StatsFactory.js +11 -11
- package/lib/stats/StatsPrinter.js +7 -7
- package/lib/util/ArrayHelpers.js +2 -4
- package/lib/util/ArrayQueue.js +1 -1
- package/lib/util/AsyncQueue.js +4 -4
- package/lib/util/IterableHelpers.js +1 -1
- package/lib/util/LazyBucketSortedSet.js +41 -23
- package/lib/util/LazySet.js +3 -2
- package/lib/util/MapHelpers.js +1 -1
- package/lib/util/ParallelismFactorCalculator.js +1 -1
- package/lib/util/Semaphore.js +3 -3
- package/lib/util/SetHelpers.js +1 -1
- package/lib/util/SortableSet.js +9 -7
- package/lib/util/TupleQueue.js +9 -8
- package/lib/util/TupleSet.js +2 -2
- package/lib/util/WeakTupleMap.js +12 -11
- package/lib/util/binarySearchBounds.js +2 -1
- package/lib/util/cleverMerge.js +84 -54
- package/lib/util/comparators.js +22 -21
- package/lib/util/compileBooleanMatcher.js +3 -3
- package/lib/util/concatenate.js +6 -4
- package/lib/util/create-schema-validation.js +4 -4
- package/lib/util/createHash.js +2 -2
- package/lib/util/deprecation.js +35 -33
- package/lib/util/deterministicGrouping.js +6 -6
- package/lib/util/findGraphRoots.js +1 -1
- package/lib/util/fs.js +39 -39
- package/lib/util/hash/wasm-hash.js +2 -2
- package/lib/util/identifier.js +15 -18
- package/lib/util/makeSerializable.js +1 -1
- package/lib/util/memoize.js +4 -1
- package/lib/util/objectToMap.js +3 -2
- package/lib/util/processAsyncTree.js +2 -2
- package/lib/util/propertyName.js +0 -1
- package/lib/util/registerExternalSerializer.js +15 -18
- package/lib/util/removeBOM.js +25 -0
- package/lib/util/runtime.js +34 -27
- package/lib/util/semver.js +18 -8
- package/lib/util/serialization.js +5 -16
- package/lib/util/smartGrouping.js +3 -3
- package/lib/validateSchema.js +4 -7
- package/lib/wasm/EnableWasmLoadingPlugin.js +2 -2
- package/lib/wasm-async/AsyncWasmLoadingRuntimeModule.js +3 -3
- package/lib/wasm-async/AsyncWebAssemblyGenerator.js +11 -0
- package/lib/wasm-async/AsyncWebAssemblyJavascriptGenerator.js +10 -0
- package/lib/wasm-async/AsyncWebAssemblyModulesPlugin.js +2 -2
- package/lib/wasm-async/UniversalCompileAsyncWasmPlugin.js +4 -0
- package/lib/wasm-sync/WebAssemblyGenerator.js +28 -12
- package/lib/wasm-sync/WebAssemblyJavascriptGenerator.js +10 -0
- package/lib/wasm-sync/WebAssemblyModulesPlugin.js +2 -2
- package/lib/wasm-sync/WebAssemblyParser.js +9 -4
- package/lib/web/JsonpChunkLoadingRuntimeModule.js +4 -2
- package/lib/webworker/ImportScriptsChunkLoadingPlugin.js +3 -0
- package/lib/webworker/ImportScriptsChunkLoadingRuntimeModule.js +30 -25
- package/package.json +27 -26
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +48 -13
- package/schemas/plugins/JsonModulesPluginGenerator.check.d.ts +7 -0
- package/schemas/plugins/JsonModulesPluginGenerator.check.js +6 -0
- package/schemas/plugins/JsonModulesPluginGenerator.json +11 -0
- package/schemas/plugins/JsonModulesPluginParser.check.js +1 -1
- package/schemas/plugins/JsonModulesPluginParser.json +4 -0
- package/schemas/plugins/SourceMapDevToolPlugin.json +2 -2
- package/types.d.ts +888 -583
- package/lib/library/ModernModuleLibraryPlugin.js +0 -144
package/types.d.ts
CHANGED
@@ -50,6 +50,8 @@ import {
|
|
50
50
|
ImportSpecifier,
|
51
51
|
LabeledStatement,
|
52
52
|
LogicalExpression,
|
53
|
+
MaybeNamedClassDeclaration,
|
54
|
+
MaybeNamedFunctionDeclaration,
|
53
55
|
MemberExpression,
|
54
56
|
MetaProperty,
|
55
57
|
MethodDefinition,
|
@@ -85,15 +87,15 @@ import {
|
|
85
87
|
WithStatement,
|
86
88
|
YieldExpression
|
87
89
|
} from "estree";
|
88
|
-
import {
|
89
|
-
|
90
|
-
ServerOptions as ServerOptionsImport,
|
91
|
-
ServerResponse
|
92
|
-
} from "http";
|
90
|
+
import { IncomingMessage, ServerOptions } from "http";
|
91
|
+
import { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
|
93
92
|
import { ListenOptions, Server } from "net";
|
94
93
|
import { validate as validateFunction } from "schema-utils";
|
95
94
|
import { default as ValidationError } from "schema-utils/declarations/ValidationError";
|
96
|
-
import {
|
95
|
+
import {
|
96
|
+
Extend,
|
97
|
+
ValidationErrorConfiguration
|
98
|
+
} from "schema-utils/declarations/validate";
|
97
99
|
import {
|
98
100
|
AsArray,
|
99
101
|
AsyncParallelHook,
|
@@ -119,16 +121,7 @@ declare interface Abortable {
|
|
119
121
|
signal?: AbortSignal;
|
120
122
|
}
|
121
123
|
declare class AbstractLibraryPlugin<T> {
|
122
|
-
constructor(__0:
|
123
|
-
/**
|
124
|
-
* name of the plugin
|
125
|
-
*/
|
126
|
-
pluginName: string;
|
127
|
-
/**
|
128
|
-
* used library type
|
129
|
-
*/
|
130
|
-
type: string;
|
131
|
-
});
|
124
|
+
constructor(__0: AbstractLibraryPluginOptions);
|
132
125
|
|
133
126
|
/**
|
134
127
|
* Apply the plugin
|
@@ -173,6 +166,17 @@ declare class AbstractLibraryPlugin<T> {
|
|
173
166
|
): void;
|
174
167
|
static COMMON_LIBRARY_NAME_MESSAGE: string;
|
175
168
|
}
|
169
|
+
declare interface AbstractLibraryPluginOptions {
|
170
|
+
/**
|
171
|
+
* name of the plugin
|
172
|
+
*/
|
173
|
+
pluginName: string;
|
174
|
+
|
175
|
+
/**
|
176
|
+
* used library type
|
177
|
+
*/
|
178
|
+
type: string;
|
179
|
+
}
|
176
180
|
declare interface AdditionalData {
|
177
181
|
[index: string]: any;
|
178
182
|
webpackAST: object;
|
@@ -246,9 +250,10 @@ declare interface ArgumentConfig {
|
|
246
250
|
path: string;
|
247
251
|
multiple: boolean;
|
248
252
|
type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset";
|
249
|
-
values?:
|
253
|
+
values?: EnumValue[];
|
250
254
|
}
|
251
|
-
type
|
255
|
+
type ArrayBufferLike = ArrayBuffer | SharedArrayBuffer;
|
256
|
+
type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
|
252
257
|
| Uint8Array
|
253
258
|
| Uint8ClampedArray
|
254
259
|
| Uint16Array
|
@@ -388,6 +393,7 @@ declare class AsyncDependenciesBlock extends DependenciesBlock {
|
|
388
393
|
constructor(
|
389
394
|
groupOptions:
|
390
395
|
| null
|
396
|
+
| string
|
391
397
|
| (RawChunkGroupOptions & { name?: null | string } & {
|
392
398
|
entryOptions?: EntryOptions;
|
393
399
|
}),
|
@@ -462,8 +468,8 @@ declare class AutomaticPrefetchPlugin {
|
|
462
468
|
}
|
463
469
|
type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
|
464
470
|
declare interface BackendApi {
|
465
|
-
dispose: (
|
466
|
-
module: (
|
471
|
+
dispose: (callback: (err?: null | Error) => void) => void;
|
472
|
+
module: (module: Module) => ModuleResult;
|
467
473
|
}
|
468
474
|
declare class BannerPlugin {
|
469
475
|
constructor(options: BannerPluginArgument);
|
@@ -555,8 +561,8 @@ declare abstract class BasicEvaluatedExpression {
|
|
555
561
|
prefix?: null | BasicEvaluatedExpression;
|
556
562
|
postfix?: null | BasicEvaluatedExpression;
|
557
563
|
wrappedInnerExpressions?: BasicEvaluatedExpression[];
|
558
|
-
identifier?: string |
|
559
|
-
rootInfo?: string |
|
564
|
+
identifier?: string | VariableInfo;
|
565
|
+
rootInfo?: string | VariableInfo;
|
560
566
|
getMembers?: () => string[];
|
561
567
|
getMembersOptionals?: () => boolean[];
|
562
568
|
getMemberRanges?: () => [number, number][];
|
@@ -594,6 +600,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
594
600
|
| YieldExpression
|
595
601
|
| SpreadElement
|
596
602
|
| PrivateIdentifier
|
603
|
+
| Super
|
597
604
|
| FunctionDeclaration
|
598
605
|
| VariableDeclaration
|
599
606
|
| ClassDeclaration
|
@@ -627,7 +634,6 @@ declare abstract class BasicEvaluatedExpression {
|
|
627
634
|
| RestElement
|
628
635
|
| AssignmentPattern
|
629
636
|
| Property
|
630
|
-
| Super
|
631
637
|
| AssignmentProperty
|
632
638
|
| ClassBody
|
633
639
|
| ImportSpecifier
|
@@ -715,8 +721,8 @@ declare abstract class BasicEvaluatedExpression {
|
|
715
721
|
* Set's the value of this expression to a particular identifier and its members.
|
716
722
|
*/
|
717
723
|
setIdentifier(
|
718
|
-
identifier: string |
|
719
|
-
rootInfo: string |
|
724
|
+
identifier: string | VariableInfo,
|
725
|
+
rootInfo: string | VariableInfo,
|
720
726
|
getMembers: () => string[],
|
721
727
|
getMembersOptionals?: () => boolean[],
|
722
728
|
getMemberRanges?: () => [number, number][]
|
@@ -817,6 +823,7 @@ declare abstract class BasicEvaluatedExpression {
|
|
817
823
|
| YieldExpression
|
818
824
|
| SpreadElement
|
819
825
|
| PrivateIdentifier
|
826
|
+
| Super
|
820
827
|
| FunctionDeclaration
|
821
828
|
| VariableDeclaration
|
822
829
|
| ClassDeclaration
|
@@ -850,7 +857,6 @@ declare abstract class BasicEvaluatedExpression {
|
|
850
857
|
| RestElement
|
851
858
|
| AssignmentPattern
|
852
859
|
| Property
|
853
|
-
| Super
|
854
860
|
| AssignmentProperty
|
855
861
|
| ClassBody
|
856
862
|
| ImportSpecifier
|
@@ -875,16 +881,21 @@ type BufferEncoding =
|
|
875
881
|
| "utf-16le"
|
876
882
|
| "ucs2"
|
877
883
|
| "ucs-2"
|
878
|
-
| "latin1"
|
879
|
-
| "binary"
|
880
884
|
| "base64"
|
881
885
|
| "base64url"
|
886
|
+
| "latin1"
|
887
|
+
| "binary"
|
882
888
|
| "hex";
|
883
889
|
type BufferEncodingOption = "buffer" | { encoding: "buffer" };
|
884
890
|
type BuildInfo = KnownBuildInfo & Record<string, any>;
|
885
891
|
type BuildMeta = KnownBuildMeta & Record<string, any>;
|
886
892
|
declare abstract class ByTypeGenerator extends Generator {
|
887
893
|
map: Record<string, Generator>;
|
894
|
+
generateError?: (
|
895
|
+
error: Error,
|
896
|
+
module: NormalModule,
|
897
|
+
generateContext: GenerateContext
|
898
|
+
) => null | Source;
|
888
899
|
}
|
889
900
|
declare const CIRCULAR_CONNECTION: unique symbol;
|
890
901
|
declare class Cache {
|
@@ -894,7 +905,7 @@ declare class Cache {
|
|
894
905
|
[
|
895
906
|
string,
|
896
907
|
null | Etag,
|
897
|
-
((result: any, callback: (
|
908
|
+
((result: any, callback: (err?: Error) => void) => void)[]
|
898
909
|
],
|
899
910
|
any
|
900
911
|
>;
|
@@ -956,7 +967,7 @@ declare abstract class CacheFacade {
|
|
956
967
|
provide<T>(
|
957
968
|
identifier: string,
|
958
969
|
etag: null | Etag,
|
959
|
-
computer: (
|
970
|
+
computer: (callback: CallbackNormalErrorCache<T>) => void,
|
960
971
|
callback: CallbackNormalErrorCache<T>
|
961
972
|
): void;
|
962
973
|
providePromise<T>(
|
@@ -966,12 +977,12 @@ declare abstract class CacheFacade {
|
|
966
977
|
): Promise<T>;
|
967
978
|
}
|
968
979
|
declare interface CacheGroupSource {
|
969
|
-
key
|
980
|
+
key: string;
|
970
981
|
priority?: number;
|
971
982
|
getName?: (
|
972
|
-
module
|
973
|
-
chunks
|
974
|
-
key
|
983
|
+
module: Module,
|
984
|
+
chunks: Chunk[],
|
985
|
+
key: string
|
975
986
|
) => undefined | string;
|
976
987
|
chunksFilter?: (chunk: Chunk) => undefined | boolean;
|
977
988
|
enforce?: boolean;
|
@@ -984,7 +995,7 @@ declare interface CacheGroupSource {
|
|
984
995
|
minChunks?: number;
|
985
996
|
maxAsyncRequests?: number;
|
986
997
|
maxInitialRequests?: number;
|
987
|
-
filename?: string | ((
|
998
|
+
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
988
999
|
idHint?: string;
|
989
1000
|
automaticNameDelimiter?: string;
|
990
1001
|
reuseExistingChunk?: boolean;
|
@@ -1040,15 +1051,19 @@ declare interface CallbackWebpack<T> {
|
|
1040
1051
|
}
|
1041
1052
|
type Cell<T> = undefined | T;
|
1042
1053
|
declare class Chunk {
|
1043
|
-
constructor(name?: string, backCompat?: boolean);
|
1054
|
+
constructor(name?: null | string, backCompat?: boolean);
|
1044
1055
|
id: null | string | number;
|
1045
1056
|
ids: null | ChunkId[];
|
1046
1057
|
debugId: number;
|
1047
|
-
name?: string;
|
1058
|
+
name?: null | string;
|
1048
1059
|
idNameHints: SortableSet<string>;
|
1049
1060
|
preventIntegration: boolean;
|
1050
|
-
filenameTemplate?:
|
1051
|
-
|
1061
|
+
filenameTemplate?:
|
1062
|
+
| string
|
1063
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
1064
|
+
cssFilenameTemplate?:
|
1065
|
+
| string
|
1066
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
1052
1067
|
runtime: RuntimeSpec;
|
1053
1068
|
files: Set<string>;
|
1054
1069
|
auxiliaryFiles: Set<string>;
|
@@ -1138,7 +1153,7 @@ declare class ChunkGraph {
|
|
1138
1153
|
getModuleChunksIterable(module: Module): Iterable<Chunk>;
|
1139
1154
|
getOrderedModuleChunksIterable(
|
1140
1155
|
module: Module,
|
1141
|
-
sortFn: (
|
1156
|
+
sortFn: (a: Chunk, b: Chunk) => 0 | 1 | -1
|
1142
1157
|
): Iterable<Chunk>;
|
1143
1158
|
getModuleChunks(module: Module): Chunk[];
|
1144
1159
|
getNumberOfModuleChunks(module: Module): number;
|
@@ -1159,17 +1174,17 @@ declare class ChunkGraph {
|
|
1159
1174
|
getModuleSourceTypes(module: Module): ReadonlySet<string>;
|
1160
1175
|
getOrderedChunkModulesIterable(
|
1161
1176
|
chunk: Chunk,
|
1162
|
-
comparator: (
|
1177
|
+
comparator: (a: Module, b: Module) => 0 | 1 | -1
|
1163
1178
|
): Iterable<Module>;
|
1164
1179
|
getOrderedChunkModulesIterableBySourceType(
|
1165
1180
|
chunk: Chunk,
|
1166
1181
|
sourceType: string,
|
1167
|
-
comparator: (
|
1182
|
+
comparator: (a: Module, b: Module) => 0 | 1 | -1
|
1168
1183
|
): undefined | Iterable<Module>;
|
1169
1184
|
getChunkModules(chunk: Chunk): Module[];
|
1170
1185
|
getOrderedChunkModules(
|
1171
1186
|
chunk: Chunk,
|
1172
|
-
comparator: (
|
1187
|
+
comparator: (a: Module, b: Module) => 0 | 1 | -1
|
1173
1188
|
): Module[];
|
1174
1189
|
getChunkModuleIdMap(
|
1175
1190
|
chunk: Chunk,
|
@@ -1465,7 +1480,7 @@ declare interface ChunkPathData {
|
|
1465
1480
|
id: string | number;
|
1466
1481
|
name?: string;
|
1467
1482
|
hash: string;
|
1468
|
-
hashWithLength?: (
|
1483
|
+
hashWithLength?: (length: number) => string;
|
1469
1484
|
contentHash?: Record<string, string>;
|
1470
1485
|
contentHashWithLength?: Record<string, (length: number) => string>;
|
1471
1486
|
}
|
@@ -1559,8 +1574,8 @@ declare abstract class ChunkTemplate {
|
|
1559
1574
|
| string
|
1560
1575
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1561
1576
|
fn: (
|
1562
|
-
|
1563
|
-
|
1577
|
+
renderManifestEntries: RenderManifestEntry[],
|
1578
|
+
renderManifestOptions: RenderManifestOptions
|
1564
1579
|
) => RenderManifestEntry[]
|
1565
1580
|
) => void;
|
1566
1581
|
};
|
@@ -1570,9 +1585,9 @@ declare abstract class ChunkTemplate {
|
|
1570
1585
|
| string
|
1571
1586
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1572
1587
|
fn: (
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1588
|
+
source: Source,
|
1589
|
+
moduleTemplate: ModuleTemplate,
|
1590
|
+
renderContext: RenderContextJavascriptModulesPlugin
|
1576
1591
|
) => Source
|
1577
1592
|
) => void;
|
1578
1593
|
};
|
@@ -1582,9 +1597,9 @@ declare abstract class ChunkTemplate {
|
|
1582
1597
|
| string
|
1583
1598
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1584
1599
|
fn: (
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1600
|
+
source: Source,
|
1601
|
+
moduleTemplate: ModuleTemplate,
|
1602
|
+
renderContext: RenderContextJavascriptModulesPlugin
|
1588
1603
|
) => Source
|
1589
1604
|
) => void;
|
1590
1605
|
};
|
@@ -1593,7 +1608,7 @@ declare abstract class ChunkTemplate {
|
|
1593
1608
|
options:
|
1594
1609
|
| string
|
1595
1610
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1596
|
-
fn: (
|
1611
|
+
fn: (source: Source, chunk: Chunk) => Source
|
1597
1612
|
) => void;
|
1598
1613
|
};
|
1599
1614
|
hash: {
|
@@ -1601,7 +1616,7 @@ declare abstract class ChunkTemplate {
|
|
1601
1616
|
options:
|
1602
1617
|
| string
|
1603
1618
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1604
|
-
fn: (
|
1619
|
+
fn: (hash: Hash) => void
|
1605
1620
|
) => void;
|
1606
1621
|
};
|
1607
1622
|
hashForChunk: {
|
@@ -1609,7 +1624,11 @@ declare abstract class ChunkTemplate {
|
|
1609
1624
|
options:
|
1610
1625
|
| string
|
1611
1626
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
1612
|
-
fn: (
|
1627
|
+
fn: (
|
1628
|
+
hash: Hash,
|
1629
|
+
chunk: Chunk,
|
1630
|
+
chunkHashContext: ChunkHashContext
|
1631
|
+
) => void
|
1613
1632
|
) => void;
|
1614
1633
|
};
|
1615
1634
|
}>;
|
@@ -1703,6 +1722,12 @@ declare interface CodeGenerationContext {
|
|
1703
1722
|
*/
|
1704
1723
|
sourceTypes?: ReadonlySet<string>;
|
1705
1724
|
}
|
1725
|
+
declare interface CodeGenerationJob {
|
1726
|
+
module: Module;
|
1727
|
+
hash: string;
|
1728
|
+
runtime: RuntimeSpec;
|
1729
|
+
runtimes: RuntimeSpec[];
|
1730
|
+
}
|
1706
1731
|
declare interface CodeGenerationResult {
|
1707
1732
|
/**
|
1708
1733
|
* the resulting sources for all source types
|
@@ -1725,7 +1750,7 @@ declare interface CodeGenerationResult {
|
|
1725
1750
|
hash?: string;
|
1726
1751
|
}
|
1727
1752
|
declare abstract class CodeGenerationResults {
|
1728
|
-
map: Map<Module, RuntimeSpecMap<CodeGenerationResult>>;
|
1753
|
+
map: Map<Module, RuntimeSpecMap<CodeGenerationResult, CodeGenerationResult>>;
|
1729
1754
|
get(module: Module, runtime: RuntimeSpec): CodeGenerationResult;
|
1730
1755
|
has(module: Module, runtime: RuntimeSpec): boolean;
|
1731
1756
|
getSource(module: Module, runtime: RuntimeSpec, sourceType: string): Source;
|
@@ -1734,7 +1759,7 @@ declare abstract class CodeGenerationResults {
|
|
1734
1759
|
runtime: RuntimeSpec
|
1735
1760
|
): null | ReadonlySet<string>;
|
1736
1761
|
getData(module: Module, runtime: RuntimeSpec, key: string): any;
|
1737
|
-
getHash(module: Module, runtime: RuntimeSpec):
|
1762
|
+
getHash(module: Module, runtime: RuntimeSpec): string;
|
1738
1763
|
add(module: Module, runtime: RuntimeSpec, result: CodeGenerationResult): void;
|
1739
1764
|
}
|
1740
1765
|
type CodeValue =
|
@@ -1781,7 +1806,7 @@ type CodeValuePrimitive =
|
|
1781
1806
|
| Function
|
1782
1807
|
| RegExp;
|
1783
1808
|
declare interface Comparator<T> {
|
1784
|
-
(
|
1809
|
+
(a: T, b: T): 0 | 1 | -1;
|
1785
1810
|
}
|
1786
1811
|
declare class CompatSource extends Source {
|
1787
1812
|
constructor(sourceLike: SourceLike);
|
@@ -1856,18 +1881,18 @@ declare class Compilation {
|
|
1856
1881
|
SyncBailHook<[Chunk, Set<string>, RuntimeRequirementsContext], void>
|
1857
1882
|
>;
|
1858
1883
|
runtimeModule: SyncHook<[RuntimeModule, Chunk]>;
|
1859
|
-
reviveModules: SyncHook<[Iterable<Module>,
|
1884
|
+
reviveModules: SyncHook<[Iterable<Module>, Records]>;
|
1860
1885
|
beforeModuleIds: SyncHook<[Iterable<Module>]>;
|
1861
1886
|
moduleIds: SyncHook<[Iterable<Module>]>;
|
1862
1887
|
optimizeModuleIds: SyncHook<[Iterable<Module>]>;
|
1863
1888
|
afterOptimizeModuleIds: SyncHook<[Iterable<Module>]>;
|
1864
|
-
reviveChunks: SyncHook<[Iterable<Chunk>,
|
1889
|
+
reviveChunks: SyncHook<[Iterable<Chunk>, Records]>;
|
1865
1890
|
beforeChunkIds: SyncHook<[Iterable<Chunk>]>;
|
1866
1891
|
chunkIds: SyncHook<[Iterable<Chunk>]>;
|
1867
1892
|
optimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
|
1868
1893
|
afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>]>;
|
1869
|
-
recordModules: SyncHook<[Iterable<Module>,
|
1870
|
-
recordChunks: SyncHook<[Iterable<Chunk>,
|
1894
|
+
recordModules: SyncHook<[Iterable<Module>, Records]>;
|
1895
|
+
recordChunks: SyncHook<[Iterable<Chunk>, Records]>;
|
1871
1896
|
optimizeCodeGeneration: SyncHook<[Iterable<Module>]>;
|
1872
1897
|
beforeModuleHash: SyncHook<[]>;
|
1873
1898
|
afterModuleHash: SyncHook<[]>;
|
@@ -1878,8 +1903,8 @@ declare class Compilation {
|
|
1878
1903
|
beforeHash: SyncHook<[]>;
|
1879
1904
|
contentHash: SyncHook<[Chunk]>;
|
1880
1905
|
afterHash: SyncHook<[]>;
|
1881
|
-
recordHash: SyncHook<[
|
1882
|
-
record: SyncHook<[Compilation,
|
1906
|
+
recordHash: SyncHook<[Records]>;
|
1907
|
+
record: SyncHook<[Compilation, Records]>;
|
1883
1908
|
beforeModuleAssets: SyncHook<[]>;
|
1884
1909
|
shouldGenerateChunkAssets: SyncBailHook<[], boolean | void>;
|
1885
1910
|
beforeChunkAssets: SyncHook<[]>;
|
@@ -1924,7 +1949,7 @@ declare class Compilation {
|
|
1924
1949
|
chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext]>;
|
1925
1950
|
moduleAsset: SyncHook<[Module, string]>;
|
1926
1951
|
chunkAsset: SyncHook<[Chunk, string]>;
|
1927
|
-
assetPath: SyncWaterfallHook<[string,
|
1952
|
+
assetPath: SyncWaterfallHook<[string, PathData, undefined | AssetInfo]>;
|
1928
1953
|
needAdditionalPass: SyncBailHook<[], boolean | void>;
|
1929
1954
|
childCompiler: SyncHook<[Compiler, string, number]>;
|
1930
1955
|
log: SyncBailHook<[string, LogEntry], boolean | void>;
|
@@ -1992,7 +2017,7 @@ declare class Compilation {
|
|
1992
2017
|
namedChunkGroups: Map<string, ChunkGroup>;
|
1993
2018
|
namedChunks: Map<string, Chunk>;
|
1994
2019
|
modules: Set<Module>;
|
1995
|
-
records:
|
2020
|
+
records: null | Records;
|
1996
2021
|
additionalChunkAssets: string[];
|
1997
2022
|
assets: CompilationAssets;
|
1998
2023
|
assetsInfo: Map<string, AssetInfo>;
|
@@ -2003,8 +2028,8 @@ declare class Compilation {
|
|
2003
2028
|
dependencyFactories: Map<DepConstructor, ModuleFactory>;
|
2004
2029
|
dependencyTemplates: DependencyTemplates;
|
2005
2030
|
childrenCounters: Record<string, number>;
|
2006
|
-
usedChunkIds: Set<string | number>;
|
2007
|
-
usedModuleIds: Set<number>;
|
2031
|
+
usedChunkIds: null | Set<string | number>;
|
2032
|
+
usedModuleIds: null | Set<number>;
|
2008
2033
|
needAdditionalPass: boolean;
|
2009
2034
|
builtModules: WeakSet<Module>;
|
2010
2035
|
codeGeneratedModules: WeakSet<Module>;
|
@@ -2150,7 +2175,7 @@ declare class Compilation {
|
|
2150
2175
|
* This method first looks to see if a name is provided for a new chunk,
|
2151
2176
|
* and first looks to see if any named chunks already exist and reuse that chunk instead.
|
2152
2177
|
*/
|
2153
|
-
addChunk(name?: string): Chunk;
|
2178
|
+
addChunk(name?: null | string): Chunk;
|
2154
2179
|
assignDepth(module: Module): void;
|
2155
2180
|
assignDepths(modules: Set<Module>): void;
|
2156
2181
|
getDependencyReferencedExports(
|
@@ -2167,19 +2192,16 @@ declare class Compilation {
|
|
2167
2192
|
sortItemsWithChunkIds(): void;
|
2168
2193
|
summarizeDependencies(): void;
|
2169
2194
|
createModuleHashes(): void;
|
2170
|
-
createHash():
|
2171
|
-
module: Module;
|
2172
|
-
hash: string;
|
2173
|
-
runtime: RuntimeSpec;
|
2174
|
-
runtimes: RuntimeSpec[];
|
2175
|
-
}[];
|
2195
|
+
createHash(): CodeGenerationJob[];
|
2176
2196
|
fullHash?: string;
|
2177
2197
|
hash?: string;
|
2178
2198
|
emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void;
|
2179
2199
|
updateAsset(
|
2180
2200
|
file: string,
|
2181
|
-
newSourceOrFunction: Source | ((
|
2182
|
-
assetInfoUpdateOrFunction?:
|
2201
|
+
newSourceOrFunction: Source | ((source: Source) => Source),
|
2202
|
+
assetInfoUpdateOrFunction?:
|
2203
|
+
| AssetInfo
|
2204
|
+
| ((assetInfo?: AssetInfo) => undefined | AssetInfo)
|
2183
2205
|
): void;
|
2184
2206
|
renameAsset(file: string, newFile: string): void;
|
2185
2207
|
deleteAsset(file: string): void;
|
@@ -2436,17 +2458,14 @@ declare class Compiler {
|
|
2436
2458
|
immutablePaths: Set<string | RegExp>;
|
2437
2459
|
modifiedFiles?: ReadonlySet<string>;
|
2438
2460
|
removedFiles?: ReadonlySet<string>;
|
2439
|
-
fileTimestamps?:
|
2440
|
-
contextTimestamps?:
|
2441
|
-
string,
|
2442
|
-
null | FileSystemInfoEntry | "ignore"
|
2443
|
-
>;
|
2461
|
+
fileTimestamps?: Map<string, FileSystemInfoEntry | "ignore">;
|
2462
|
+
contextTimestamps?: Map<string, FileSystemInfoEntry | "ignore">;
|
2444
2463
|
fsStartTime?: number;
|
2445
2464
|
resolverFactory: ResolverFactory;
|
2446
2465
|
infrastructureLogger?: (
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2466
|
+
value: string,
|
2467
|
+
type: LogTypeEnum,
|
2468
|
+
args?: any[]
|
2450
2469
|
) => void;
|
2451
2470
|
platform: Readonly<PlatformTargetProperties>;
|
2452
2471
|
options: WebpackOptionsNormalized;
|
@@ -3059,15 +3078,21 @@ declare interface ContextModuleOptions {
|
|
3059
3078
|
declare class ContextReplacementPlugin {
|
3060
3079
|
constructor(
|
3061
3080
|
resourceRegExp: RegExp,
|
3062
|
-
newContentResource?: any,
|
3063
|
-
newContentRecursive?:
|
3081
|
+
newContentResource?: string | boolean | RegExp | ((context?: any) => void),
|
3082
|
+
newContentRecursive?: boolean | RegExp | NewContentCreateContextMap,
|
3064
3083
|
newContentRegExp?: RegExp
|
3065
3084
|
);
|
3066
3085
|
resourceRegExp: RegExp;
|
3067
|
-
newContentCallback
|
3068
|
-
newContentResource
|
3069
|
-
newContentCreateContextMap
|
3070
|
-
|
3086
|
+
newContentCallback?: (context?: any) => void;
|
3087
|
+
newContentResource?: string;
|
3088
|
+
newContentCreateContextMap?: (
|
3089
|
+
fs: InputFileSystem,
|
3090
|
+
callback: (
|
3091
|
+
err: null | Error,
|
3092
|
+
newContentRecursive: NewContentCreateContextMap
|
3093
|
+
) => void
|
3094
|
+
) => void;
|
3095
|
+
newContentRecursive?: boolean;
|
3071
3096
|
newContentRegExp?: RegExp;
|
3072
3097
|
|
3073
3098
|
/**
|
@@ -3075,6 +3100,7 @@ declare class ContextReplacementPlugin {
|
|
3075
3100
|
*/
|
3076
3101
|
apply(compiler: Compiler): void;
|
3077
3102
|
}
|
3103
|
+
type ContextTimestamp = null | ContextFileSystemInfoEntry | "ignore";
|
3078
3104
|
declare interface ContextTimestampAndHash {
|
3079
3105
|
safeTime: number;
|
3080
3106
|
timestampHash?: string;
|
@@ -3082,8 +3108,8 @@ declare interface ContextTimestampAndHash {
|
|
3082
3108
|
resolved?: ResolvedContextTimestampAndHash;
|
3083
3109
|
symlinks?: Set<string>;
|
3084
3110
|
}
|
3085
|
-
type CreateStatsOptionsContext =
|
3086
|
-
|
3111
|
+
type CreateStatsOptionsContext = KnownCreateStatsOptionsContext &
|
3112
|
+
Record<string, any>;
|
3087
3113
|
type CreateWriteStreamFSImplementation = FSImplementation & {
|
3088
3114
|
write: (...args: any[]) => any;
|
3089
3115
|
close?: (...args: any[]) => any;
|
@@ -3367,7 +3393,7 @@ declare class DefinePlugin {
|
|
3367
3393
|
*/
|
3368
3394
|
apply(compiler: Compiler): void;
|
3369
3395
|
static runtimeValue(
|
3370
|
-
fn: (
|
3396
|
+
fn: (value: {
|
3371
3397
|
module: NormalModule;
|
3372
3398
|
key: string;
|
3373
3399
|
readonly version: ValueCacheVersion;
|
@@ -3447,7 +3473,10 @@ declare class Dependency {
|
|
3447
3473
|
):
|
3448
3474
|
| null
|
3449
3475
|
| false
|
3450
|
-
| ((
|
3476
|
+
| ((
|
3477
|
+
moduleGraphConnection: ModuleGraphConnection,
|
3478
|
+
runtime: RuntimeSpec
|
3479
|
+
) => ConnectionState);
|
3451
3480
|
|
3452
3481
|
/**
|
3453
3482
|
* Returns the exported names
|
@@ -3612,7 +3641,7 @@ declare interface DeterministicModuleIdsPluginOptions {
|
|
3612
3641
|
/**
|
3613
3642
|
* selector function for modules
|
3614
3643
|
*/
|
3615
|
-
test?: (
|
3644
|
+
test?: (module: Module) => boolean;
|
3616
3645
|
|
3617
3646
|
/**
|
3618
3647
|
* maximum id length in digits (used as starting point)
|
@@ -3634,7 +3663,7 @@ declare interface DeterministicModuleIdsPluginOptions {
|
|
3634
3663
|
*/
|
3635
3664
|
failOnConflict?: boolean;
|
3636
3665
|
}
|
3637
|
-
type DevtoolModuleFilenameTemplate = string |
|
3666
|
+
type DevtoolModuleFilenameTemplate = string | ((context?: any) => string);
|
3638
3667
|
declare interface Dirent {
|
3639
3668
|
isFile: () => boolean;
|
3640
3669
|
isDirectory: () => boolean;
|
@@ -3938,10 +3967,10 @@ type EncodingOption =
|
|
3938
3967
|
| "utf-16le"
|
3939
3968
|
| "ucs2"
|
3940
3969
|
| "ucs-2"
|
3941
|
-
| "latin1"
|
3942
|
-
| "binary"
|
3943
3970
|
| "base64"
|
3944
3971
|
| "base64url"
|
3972
|
+
| "latin1"
|
3973
|
+
| "binary"
|
3945
3974
|
| "hex"
|
3946
3975
|
| ObjectEncodingOptions;
|
3947
3976
|
type Entry =
|
@@ -4163,6 +4192,16 @@ declare abstract class Entrypoint extends ChunkGroup {
|
|
4163
4192
|
*/
|
4164
4193
|
getEntrypointChunk(): Chunk;
|
4165
4194
|
}
|
4195
|
+
type EnumValue =
|
4196
|
+
| null
|
4197
|
+
| string
|
4198
|
+
| number
|
4199
|
+
| boolean
|
4200
|
+
| EnumValueObject
|
4201
|
+
| EnumValue[];
|
4202
|
+
declare interface EnumValueObject {
|
4203
|
+
[index: string]: EnumValue;
|
4204
|
+
}
|
4166
4205
|
|
4167
4206
|
/**
|
4168
4207
|
* The abilities of the environment where the webpack generated code should run.
|
@@ -4277,12 +4316,12 @@ declare interface EvalDevToolModulePluginOptions {
|
|
4277
4316
|
/**
|
4278
4317
|
* module filename template
|
4279
4318
|
*/
|
4280
|
-
moduleFilenameTemplate?: string |
|
4319
|
+
moduleFilenameTemplate?: string | ((context?: any) => string);
|
4281
4320
|
}
|
4282
4321
|
declare class EvalSourceMapDevToolPlugin {
|
4283
4322
|
constructor(inputOptions: string | SourceMapDevToolPluginOptions);
|
4284
4323
|
sourceMapComment: string;
|
4285
|
-
moduleFilenameTemplate: string |
|
4324
|
+
moduleFilenameTemplate: string | ((context?: any) => string);
|
4286
4325
|
namespace: string;
|
4287
4326
|
options: SourceMapDevToolPluginOptions;
|
4288
4327
|
|
@@ -4293,15 +4332,36 @@ declare class EvalSourceMapDevToolPlugin {
|
|
4293
4332
|
}
|
4294
4333
|
declare interface ExecuteModuleArgument {
|
4295
4334
|
module: Module;
|
4296
|
-
moduleObject?:
|
4335
|
+
moduleObject?: ExecuteModuleObject;
|
4297
4336
|
preparedInfo: any;
|
4298
4337
|
codeGenerationResult: CodeGenerationResult;
|
4299
4338
|
}
|
4300
4339
|
declare interface ExecuteModuleContext {
|
4301
|
-
assets: Map<string, { source: Source; info
|
4340
|
+
assets: Map<string, { source: Source; info?: AssetInfo }>;
|
4302
4341
|
chunk: Chunk;
|
4303
4342
|
chunkGraph: ChunkGraph;
|
4304
|
-
__webpack_require__?:
|
4343
|
+
__webpack_require__?: WebpackRequire;
|
4344
|
+
}
|
4345
|
+
declare interface ExecuteModuleObject {
|
4346
|
+
/**
|
4347
|
+
* module id
|
4348
|
+
*/
|
4349
|
+
id?: string;
|
4350
|
+
|
4351
|
+
/**
|
4352
|
+
* exports
|
4353
|
+
*/
|
4354
|
+
exports: any;
|
4355
|
+
|
4356
|
+
/**
|
4357
|
+
* is loaded
|
4358
|
+
*/
|
4359
|
+
loaded: boolean;
|
4360
|
+
|
4361
|
+
/**
|
4362
|
+
* error
|
4363
|
+
*/
|
4364
|
+
error?: Error;
|
4305
4365
|
}
|
4306
4366
|
declare interface ExecuteModuleOptions {
|
4307
4367
|
entryOptions?: EntryOptions;
|
@@ -4309,12 +4369,28 @@ declare interface ExecuteModuleOptions {
|
|
4309
4369
|
declare interface ExecuteModuleResult {
|
4310
4370
|
exports: any;
|
4311
4371
|
cacheable: boolean;
|
4312
|
-
assets: Map<string, { source: Source; info
|
4372
|
+
assets: Map<string, { source: Source; info?: AssetInfo }>;
|
4313
4373
|
fileDependencies: LazySet<string>;
|
4314
4374
|
contextDependencies: LazySet<string>;
|
4315
4375
|
missingDependencies: LazySet<string>;
|
4316
4376
|
buildDependencies: LazySet<string>;
|
4317
4377
|
}
|
4378
|
+
declare interface ExecuteOptions {
|
4379
|
+
/**
|
4380
|
+
* module id
|
4381
|
+
*/
|
4382
|
+
id?: string;
|
4383
|
+
|
4384
|
+
/**
|
4385
|
+
* module
|
4386
|
+
*/
|
4387
|
+
module: ExecuteModuleObject;
|
4388
|
+
|
4389
|
+
/**
|
4390
|
+
* require function
|
4391
|
+
*/
|
4392
|
+
require: WebpackRequire;
|
4393
|
+
}
|
4318
4394
|
type Experiments = ExperimentsCommon & ExperimentsExtra;
|
4319
4395
|
|
4320
4396
|
/**
|
@@ -4441,14 +4517,14 @@ declare abstract class ExportInfo {
|
|
4441
4517
|
setUsedWithoutInfo(runtime: RuntimeSpec): boolean;
|
4442
4518
|
setHasUseInfo(): void;
|
4443
4519
|
setUsedConditionally(
|
4444
|
-
condition: (
|
4520
|
+
condition: (condition: UsageStateType) => boolean,
|
4445
4521
|
newValue: UsageStateType,
|
4446
4522
|
runtime: RuntimeSpec
|
4447
4523
|
): boolean;
|
4448
4524
|
setUsed(newValue: UsageStateType, runtime: RuntimeSpec): boolean;
|
4449
|
-
unsetTarget(key
|
4525
|
+
unsetTarget(key: Dependency): boolean;
|
4450
4526
|
setTarget(
|
4451
|
-
key:
|
4527
|
+
key: Dependency,
|
4452
4528
|
connection: ModuleGraphConnection,
|
4453
4529
|
exportName?: null | string[],
|
4454
4530
|
priority?: number
|
@@ -4470,26 +4546,28 @@ declare abstract class ExportInfo {
|
|
4470
4546
|
setUsedName(name: string): void;
|
4471
4547
|
getTerminalBinding(
|
4472
4548
|
moduleGraph: ModuleGraph,
|
4473
|
-
resolveTargetFilter?: (
|
4549
|
+
resolveTargetFilter?: (target: TargetItemWithConnection) => boolean
|
4474
4550
|
): undefined | ExportsInfo | ExportInfo;
|
4475
4551
|
isReexport(): undefined | boolean;
|
4476
4552
|
findTarget(
|
4477
4553
|
moduleGraph: ModuleGraph,
|
4478
|
-
validTargetModuleFilter: (
|
4554
|
+
validTargetModuleFilter: (module: Module) => boolean
|
4479
4555
|
): undefined | null | false | TargetItemWithoutConnection;
|
4480
4556
|
getTarget(
|
4481
4557
|
moduleGraph: ModuleGraph,
|
4482
|
-
resolveTargetFilter?: (
|
4483
|
-
): undefined |
|
4558
|
+
resolveTargetFilter?: (target: TargetItemWithConnection) => boolean
|
4559
|
+
): undefined | TargetItemWithConnection;
|
4484
4560
|
|
4485
4561
|
/**
|
4486
4562
|
* Move the target forward as long resolveTargetFilter is fulfilled
|
4487
4563
|
*/
|
4488
4564
|
moveTarget(
|
4489
4565
|
moduleGraph: ModuleGraph,
|
4490
|
-
resolveTargetFilter: (
|
4491
|
-
updateOriginalConnection?: (
|
4492
|
-
|
4566
|
+
resolveTargetFilter: (target: TargetItemWithConnection) => boolean,
|
4567
|
+
updateOriginalConnection?: (
|
4568
|
+
target: TargetItemWithConnection
|
4569
|
+
) => ModuleGraphConnection
|
4570
|
+
): undefined | TargetItemWithConnection;
|
4493
4571
|
createNestedExportsInfo(): ExportsInfo;
|
4494
4572
|
getNestedExportsInfo(): undefined | ExportsInfo;
|
4495
4573
|
hasInfo(baseInfo: ExportInfo, runtime: RuntimeSpec): boolean;
|
@@ -4505,6 +4583,7 @@ declare abstract class ExportInfo {
|
|
4505
4583
|
type ExportNamedDeclarationJavascriptParser = ExportNamedDeclarationImport & {
|
4506
4584
|
attributes?: ImportAttribute[];
|
4507
4585
|
};
|
4586
|
+
type ExportPresenceMode = false | 0 | 1 | 2 | 3;
|
4508
4587
|
declare interface ExportSpec {
|
4509
4588
|
/**
|
4510
4589
|
* the name of the export
|
@@ -4564,7 +4643,7 @@ declare abstract class ExportsInfo {
|
|
4564
4643
|
setUnknownExportsProvided(
|
4565
4644
|
canMangle?: boolean,
|
4566
4645
|
excludeExports?: Set<string>,
|
4567
|
-
targetKey?:
|
4646
|
+
targetKey?: Dependency,
|
4568
4647
|
targetModule?: ModuleGraphConnection,
|
4569
4648
|
priority?: number
|
4570
4649
|
): boolean;
|
@@ -4584,12 +4663,7 @@ declare abstract class ExportsInfo {
|
|
4584
4663
|
getUsedName(name: string | string[], runtime: RuntimeSpec): UsedName;
|
4585
4664
|
updateHash(hash: Hash, runtime: RuntimeSpec): void;
|
4586
4665
|
getRestoreProvidedData(): RestoreProvidedData;
|
4587
|
-
restoreProvided(__0:
|
4588
|
-
otherProvided: any;
|
4589
|
-
otherCanMangleProvide: any;
|
4590
|
-
otherTerminalBinding: any;
|
4591
|
-
exports: any;
|
4592
|
-
}): void;
|
4666
|
+
restoreProvided(__0: RestoreProvidedData): void;
|
4593
4667
|
}
|
4594
4668
|
declare interface ExportsSpec {
|
4595
4669
|
/**
|
@@ -4739,7 +4813,11 @@ declare interface ExternalItemFunctionData {
|
|
4739
4813
|
| ((
|
4740
4814
|
context: string,
|
4741
4815
|
request: string,
|
4742
|
-
callback: (
|
4816
|
+
callback: (
|
4817
|
+
err?: null | Error,
|
4818
|
+
result?: string | false,
|
4819
|
+
resolveRequest?: ResolveRequest
|
4820
|
+
) => void
|
4743
4821
|
) => void)
|
4744
4822
|
| ((context: string, request: string) => Promise<string>);
|
4745
4823
|
|
@@ -4790,7 +4868,7 @@ declare class ExternalModule extends Module {
|
|
4790
4868
|
* restore unsafe cache data
|
4791
4869
|
*/
|
4792
4870
|
restoreFromUnsafeCache(
|
4793
|
-
unsafeCacheData:
|
4871
|
+
unsafeCacheData: UnsafeCacheData,
|
4794
4872
|
normalModuleFactory: NormalModuleFactory
|
4795
4873
|
): void;
|
4796
4874
|
}
|
@@ -5091,53 +5169,56 @@ declare abstract class FileSystemInfo {
|
|
5091
5169
|
logStatistics(): void;
|
5092
5170
|
clear(): void;
|
5093
5171
|
addFileTimestamps(
|
5094
|
-
map: ReadonlyMap<string,
|
5172
|
+
map: ReadonlyMap<string, FileTimestamp>,
|
5095
5173
|
immutable?: boolean
|
5096
5174
|
): void;
|
5097
5175
|
addContextTimestamps(
|
5098
|
-
map: ReadonlyMap<string,
|
5176
|
+
map: ReadonlyMap<string, ContextTimestamp>,
|
5099
5177
|
immutable?: boolean
|
5100
5178
|
): void;
|
5101
5179
|
getFileTimestamp(
|
5102
5180
|
path: string,
|
5103
5181
|
callback: (
|
5104
|
-
|
5105
|
-
|
5182
|
+
err?: null | WebpackError,
|
5183
|
+
fileTimestamp?: null | FileSystemInfoEntry | "ignore"
|
5106
5184
|
) => void
|
5107
5185
|
): void;
|
5108
5186
|
getContextTimestamp(
|
5109
5187
|
path: string,
|
5110
5188
|
callback: (
|
5111
|
-
|
5112
|
-
|
5189
|
+
err?: null | WebpackError,
|
5190
|
+
resolvedContextTimestamp?:
|
5191
|
+
| null
|
5192
|
+
| "ignore"
|
5193
|
+
| ResolvedContextFileSystemInfoEntry
|
5113
5194
|
) => void
|
5114
5195
|
): void;
|
5115
5196
|
getFileHash(
|
5116
5197
|
path: string,
|
5117
|
-
callback: (
|
5198
|
+
callback: (err?: null | WebpackError, hash?: null | string) => void
|
5118
5199
|
): void;
|
5119
5200
|
getContextHash(
|
5120
5201
|
path: string,
|
5121
|
-
callback: (
|
5202
|
+
callback: (err?: null | WebpackError, contextHash?: string) => void
|
5122
5203
|
): void;
|
5123
5204
|
getContextTsh(
|
5124
5205
|
path: string,
|
5125
5206
|
callback: (
|
5126
|
-
|
5127
|
-
|
5207
|
+
err?: null | WebpackError,
|
5208
|
+
resolvedContextTimestampAndHash?: null | ResolvedContextTimestampAndHash
|
5128
5209
|
) => void
|
5129
5210
|
): void;
|
5130
5211
|
resolveBuildDependencies(
|
5131
5212
|
context: string,
|
5132
5213
|
deps: Iterable<string>,
|
5133
5214
|
callback: (
|
5134
|
-
|
5135
|
-
|
5215
|
+
err?: null | Error,
|
5216
|
+
resolveBuildDependenciesResult?: ResolveBuildDependenciesResult
|
5136
5217
|
) => void
|
5137
5218
|
): void;
|
5138
5219
|
checkResolveResultsValid(
|
5139
|
-
resolveResults: Map<string, string | false>,
|
5140
|
-
callback: (
|
5220
|
+
resolveResults: Map<string, undefined | string | false>,
|
5221
|
+
callback: (err?: null | Error, result?: boolean) => void
|
5141
5222
|
): void;
|
5142
5223
|
createSnapshot(
|
5143
5224
|
startTime: undefined | null | number,
|
@@ -5145,20 +5226,21 @@ declare abstract class FileSystemInfo {
|
|
5145
5226
|
directories: null | Iterable<string>,
|
5146
5227
|
missing: null | Iterable<string>,
|
5147
5228
|
options: undefined | null | SnapshotOptionsFileSystemInfo,
|
5148
|
-
callback: (
|
5229
|
+
callback: (err: null | WebpackError, snapshot: null | Snapshot) => void
|
5149
5230
|
): void;
|
5150
5231
|
mergeSnapshots(snapshot1: Snapshot, snapshot2: Snapshot): Snapshot;
|
5151
5232
|
checkSnapshotValid(
|
5152
5233
|
snapshot: Snapshot,
|
5153
|
-
callback: (
|
5234
|
+
callback: (err?: null | WebpackError, result?: boolean) => void
|
5154
5235
|
): void;
|
5155
|
-
getDeprecatedFileTimestamps(): Map<
|
5156
|
-
getDeprecatedContextTimestamps(): Map<
|
5236
|
+
getDeprecatedFileTimestamps(): Map<string, null | number>;
|
5237
|
+
getDeprecatedContextTimestamps(): Map<string, null | number>;
|
5157
5238
|
}
|
5158
5239
|
declare interface FileSystemInfoEntry {
|
5159
5240
|
safeTime: number;
|
5160
5241
|
timestamp?: number;
|
5161
5242
|
}
|
5243
|
+
type FileTimestamp = null | FileSystemInfoEntry | "ignore";
|
5162
5244
|
type FilterItemTypes = string | RegExp | ((value: string) => boolean);
|
5163
5245
|
declare interface Flags {
|
5164
5246
|
[index: string]: Argument;
|
@@ -5290,6 +5372,11 @@ declare interface GeneratorOptionsByModuleTypeKnown {
|
|
5290
5372
|
* No generator options are supported for this module type.
|
5291
5373
|
*/
|
5292
5374
|
"javascript/esm"?: EmptyGeneratorOptions;
|
5375
|
+
|
5376
|
+
/**
|
5377
|
+
* Generator options for json modules.
|
5378
|
+
*/
|
5379
|
+
json?: JsonGeneratorOptions;
|
5293
5380
|
}
|
5294
5381
|
|
5295
5382
|
/**
|
@@ -5304,15 +5391,18 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
5304
5391
|
name: string,
|
5305
5392
|
global: string,
|
5306
5393
|
getFilenameForChunk: (
|
5307
|
-
|
5308
|
-
) =>
|
5394
|
+
chunk: Chunk
|
5395
|
+
) =>
|
5396
|
+
| string
|
5397
|
+
| false
|
5398
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string),
|
5309
5399
|
allChunks: boolean
|
5310
5400
|
);
|
5311
5401
|
contentType: string;
|
5312
5402
|
global: string;
|
5313
5403
|
getFilenameForChunk: (
|
5314
|
-
|
5315
|
-
) => string | false | ((
|
5404
|
+
chunk: Chunk
|
5405
|
+
) => string | false | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
5316
5406
|
allChunks: boolean;
|
5317
5407
|
|
5318
5408
|
/**
|
@@ -5336,9 +5426,9 @@ declare class GetChunkFilenameRuntimeModule extends RuntimeModule {
|
|
5336
5426
|
static STAGE_TRIGGER: number;
|
5337
5427
|
}
|
5338
5428
|
declare interface GroupConfig {
|
5339
|
-
getKeys: (
|
5340
|
-
createGroup: (
|
5341
|
-
getOptions?: (
|
5429
|
+
getKeys: (item?: any) => undefined | string[];
|
5430
|
+
createGroup: (key: string, children: any[], items: any[]) => object;
|
5431
|
+
getOptions?: (name: string, items: any[]) => GroupOptions;
|
5342
5432
|
}
|
5343
5433
|
declare interface GroupOptions {
|
5344
5434
|
groupChildren?: boolean;
|
@@ -5425,11 +5515,11 @@ declare class HarmonyImportDependency extends ModuleDependency {
|
|
5425
5515
|
): undefined | WebpackError[];
|
5426
5516
|
static Template: typeof HarmonyImportDependencyTemplate;
|
5427
5517
|
static ExportPresenceModes: {
|
5428
|
-
NONE:
|
5429
|
-
WARN:
|
5430
|
-
AUTO:
|
5431
|
-
ERROR:
|
5432
|
-
fromUserOption(str: string | false):
|
5518
|
+
NONE: ExportPresenceMode;
|
5519
|
+
WARN: ExportPresenceMode;
|
5520
|
+
AUTO: ExportPresenceMode;
|
5521
|
+
ERROR: ExportPresenceMode;
|
5522
|
+
fromUserOption(str: string | false): ExportPresenceMode;
|
5433
5523
|
};
|
5434
5524
|
static NO_EXPORTS_REFERENCED: string[][];
|
5435
5525
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
@@ -5457,7 +5547,7 @@ declare class Hash {
|
|
5457
5547
|
}
|
5458
5548
|
type HashFunction = string | typeof Hash;
|
5459
5549
|
declare interface HashableObject {
|
5460
|
-
updateHash: (
|
5550
|
+
updateHash: (hash: Hash) => void;
|
5461
5551
|
}
|
5462
5552
|
declare class HashedModuleIdsPlugin {
|
5463
5553
|
constructor(options?: HashedModuleIdsPluginOptions);
|
@@ -5477,7 +5567,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
5477
5567
|
/**
|
5478
5568
|
* The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.
|
5479
5569
|
*/
|
5480
|
-
hashDigest?: "
|
5570
|
+
hashDigest?: "base64" | "latin1" | "hex";
|
5481
5571
|
|
5482
5572
|
/**
|
5483
5573
|
* The prefix length of the hash digest to use, defaults to 4.
|
@@ -5491,8 +5581,7 @@ declare interface HashedModuleIdsPluginOptions {
|
|
5491
5581
|
}
|
5492
5582
|
declare abstract class HelperRuntimeModule extends RuntimeModule {}
|
5493
5583
|
declare class HotModuleReplacementPlugin {
|
5494
|
-
constructor(
|
5495
|
-
options: object;
|
5584
|
+
constructor();
|
5496
5585
|
|
5497
5586
|
/**
|
5498
5587
|
* Apply the plugin
|
@@ -5553,6 +5642,9 @@ declare class HttpUriPlugin {
|
|
5553
5642
|
*/
|
5554
5643
|
apply(compiler: Compiler): void;
|
5555
5644
|
}
|
5645
|
+
type HttpsServerOptions = SecureContextOptions &
|
5646
|
+
TlsOptions &
|
5647
|
+
ServerOptions<typeof IncomingMessage>;
|
5556
5648
|
type IBigIntStats = IStatsBase<bigint> & {
|
5557
5649
|
atimeNs: bigint;
|
5558
5650
|
mtimeNs: bigint;
|
@@ -5796,17 +5888,17 @@ declare interface InputFileSystem {
|
|
5796
5888
|
realpath?: RealPathFs;
|
5797
5889
|
realpathSync?: RealPathSync;
|
5798
5890
|
readJson?: (
|
5799
|
-
|
5800
|
-
|
5801
|
-
|
5802
|
-
|
5891
|
+
pathOrFileDescriptor: PathOrFileDescriptorFs,
|
5892
|
+
callback: (
|
5893
|
+
err: null | Error | NodeJS.ErrnoException,
|
5894
|
+
result?: JsonObjectFs
|
5803
5895
|
) => void
|
5804
5896
|
) => void;
|
5805
|
-
readJsonSync?: (
|
5806
|
-
purge?: (
|
5807
|
-
join?: (
|
5808
|
-
relative?: (
|
5809
|
-
dirname?: (
|
5897
|
+
readJsonSync?: (pathOrFileDescriptor: PathOrFileDescriptorFs) => JsonObjectFs;
|
5898
|
+
purge?: (value?: string | string[] | Set<string>) => void;
|
5899
|
+
join?: (path1: string, path2: string) => string;
|
5900
|
+
relative?: (from: string, to: string) => string;
|
5901
|
+
dirname?: (dirname: string) => string;
|
5810
5902
|
}
|
5811
5903
|
type IntermediateFileSystem = InputFileSystem &
|
5812
5904
|
OutputFileSystem &
|
@@ -5814,8 +5906,8 @@ type IntermediateFileSystem = InputFileSystem &
|
|
5814
5906
|
declare interface IntermediateFileSystemExtras {
|
5815
5907
|
mkdirSync: MkdirSync;
|
5816
5908
|
createWriteStream: (
|
5817
|
-
|
5818
|
-
|
5909
|
+
pathLike: PathLikeFs,
|
5910
|
+
result?:
|
5819
5911
|
| "ascii"
|
5820
5912
|
| "utf8"
|
5821
5913
|
| "utf-8"
|
@@ -5823,23 +5915,23 @@ declare interface IntermediateFileSystemExtras {
|
|
5823
5915
|
| "utf-16le"
|
5824
5916
|
| "ucs2"
|
5825
5917
|
| "ucs-2"
|
5826
|
-
| "latin1"
|
5827
|
-
| "binary"
|
5828
5918
|
| "base64"
|
5829
5919
|
| "base64url"
|
5920
|
+
| "latin1"
|
5921
|
+
| "binary"
|
5830
5922
|
| "hex"
|
5831
5923
|
| WriteStreamOptions
|
5832
5924
|
) => NodeJS.WritableStream;
|
5833
5925
|
open: Open;
|
5834
|
-
read: Read<
|
5926
|
+
read: Read<ArrayBufferView<ArrayBufferLike>>;
|
5835
5927
|
close: (
|
5836
|
-
|
5837
|
-
|
5928
|
+
df: number,
|
5929
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
5838
5930
|
) => void;
|
5839
5931
|
rename: (
|
5840
|
-
|
5841
|
-
|
5842
|
-
|
5932
|
+
a: PathLikeFs,
|
5933
|
+
b: PathLikeFs,
|
5934
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
5843
5935
|
) => void;
|
5844
5936
|
}
|
5845
5937
|
type InternalCell<T> = T | typeof TOMBSTONE | typeof UNDEFINED_MARKER;
|
@@ -5856,7 +5948,7 @@ declare abstract class ItemCacheFacade {
|
|
5856
5948
|
store<T>(data: T, callback: CallbackCacheCacheFacade<void>): void;
|
5857
5949
|
storePromise<T>(data: T): Promise<void>;
|
5858
5950
|
provide<T>(
|
5859
|
-
computer: (
|
5951
|
+
computer: (callback: CallbackNormalErrorCache<T>) => void,
|
5860
5952
|
callback: CallbackNormalErrorCache<T>
|
5861
5953
|
): void;
|
5862
5954
|
providePromise<T>(computer: () => T | Promise<T>): Promise<T>;
|
@@ -5956,6 +6048,7 @@ declare class JavascriptParser extends Parser {
|
|
5956
6048
|
| YieldExpression
|
5957
6049
|
| SpreadElement
|
5958
6050
|
| PrivateIdentifier
|
6051
|
+
| Super
|
5959
6052
|
],
|
5960
6053
|
undefined | null | BasicEvaluatedExpression
|
5961
6054
|
>
|
@@ -6020,8 +6113,10 @@ declare class JavascriptParser extends Parser {
|
|
6020
6113
|
| YieldExpression
|
6021
6114
|
| PrivateIdentifier
|
6022
6115
|
| FunctionDeclaration
|
6116
|
+
| MaybeNamedFunctionDeclaration
|
6023
6117
|
| VariableDeclaration
|
6024
6118
|
| ClassDeclaration
|
6119
|
+
| MaybeNamedClassDeclaration
|
6025
6120
|
),
|
6026
6121
|
number
|
6027
6122
|
],
|
@@ -6034,8 +6129,10 @@ declare class JavascriptParser extends Parser {
|
|
6034
6129
|
| ExportNamedDeclarationJavascriptParser
|
6035
6130
|
| ExportAllDeclarationJavascriptParser
|
6036
6131
|
| FunctionDeclaration
|
6132
|
+
| MaybeNamedFunctionDeclaration
|
6037
6133
|
| VariableDeclaration
|
6038
6134
|
| ClassDeclaration
|
6135
|
+
| MaybeNamedClassDeclaration
|
6039
6136
|
| ExpressionStatement
|
6040
6137
|
| BlockStatement
|
6041
6138
|
| StaticBlock
|
@@ -6065,8 +6162,10 @@ declare class JavascriptParser extends Parser {
|
|
6065
6162
|
| ExportNamedDeclarationJavascriptParser
|
6066
6163
|
| ExportAllDeclarationJavascriptParser
|
6067
6164
|
| FunctionDeclaration
|
6165
|
+
| MaybeNamedFunctionDeclaration
|
6068
6166
|
| VariableDeclaration
|
6069
6167
|
| ClassDeclaration
|
6168
|
+
| MaybeNamedClassDeclaration
|
6070
6169
|
| ExpressionStatement
|
6071
6170
|
| BlockStatement
|
6072
6171
|
| StaticBlock
|
@@ -6096,8 +6195,10 @@ declare class JavascriptParser extends Parser {
|
|
6096
6195
|
| ExportNamedDeclarationJavascriptParser
|
6097
6196
|
| ExportAllDeclarationJavascriptParser
|
6098
6197
|
| FunctionDeclaration
|
6198
|
+
| MaybeNamedFunctionDeclaration
|
6099
6199
|
| VariableDeclaration
|
6100
6200
|
| ClassDeclaration
|
6201
|
+
| MaybeNamedClassDeclaration
|
6101
6202
|
| ExpressionStatement
|
6102
6203
|
| BlockStatement
|
6103
6204
|
| StaticBlock
|
@@ -6123,13 +6224,16 @@ declare class JavascriptParser extends Parser {
|
|
6123
6224
|
>;
|
6124
6225
|
statementIf: SyncBailHook<[IfStatement], boolean | void>;
|
6125
6226
|
classExtendsExpression: SyncBailHook<
|
6126
|
-
[
|
6227
|
+
[
|
6228
|
+
Expression,
|
6229
|
+
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
6230
|
+
],
|
6127
6231
|
boolean | void
|
6128
6232
|
>;
|
6129
6233
|
classBodyElement: SyncBailHook<
|
6130
6234
|
[
|
6131
6235
|
StaticBlock | MethodDefinition | PropertyDefinition,
|
6132
|
-
ClassExpression | ClassDeclaration
|
6236
|
+
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
6133
6237
|
],
|
6134
6238
|
boolean | void
|
6135
6239
|
>;
|
@@ -6137,7 +6241,7 @@ declare class JavascriptParser extends Parser {
|
|
6137
6241
|
[
|
6138
6242
|
Expression,
|
6139
6243
|
MethodDefinition | PropertyDefinition,
|
6140
|
-
ClassExpression | ClassDeclaration
|
6244
|
+
ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
6141
6245
|
],
|
6142
6246
|
boolean | void
|
6143
6247
|
>;
|
@@ -6176,7 +6280,40 @@ declare class JavascriptParser extends Parser {
|
|
6176
6280
|
boolean | void
|
6177
6281
|
>;
|
6178
6282
|
exportExpression: SyncBailHook<
|
6179
|
-
[
|
6283
|
+
[
|
6284
|
+
ExportDefaultDeclaration,
|
6285
|
+
(
|
6286
|
+
| ImportExpressionImport
|
6287
|
+
| UnaryExpression
|
6288
|
+
| ArrayExpression
|
6289
|
+
| ArrowFunctionExpression
|
6290
|
+
| AssignmentExpression
|
6291
|
+
| AwaitExpression
|
6292
|
+
| BinaryExpression
|
6293
|
+
| SimpleCallExpression
|
6294
|
+
| NewExpression
|
6295
|
+
| ChainExpression
|
6296
|
+
| ClassExpression
|
6297
|
+
| ConditionalExpression
|
6298
|
+
| FunctionExpression
|
6299
|
+
| Identifier
|
6300
|
+
| SimpleLiteral
|
6301
|
+
| RegExpLiteral
|
6302
|
+
| BigIntLiteral
|
6303
|
+
| LogicalExpression
|
6304
|
+
| MemberExpression
|
6305
|
+
| MetaProperty
|
6306
|
+
| ObjectExpression
|
6307
|
+
| SequenceExpression
|
6308
|
+
| TaggedTemplateExpression
|
6309
|
+
| TemplateLiteral
|
6310
|
+
| ThisExpression
|
6311
|
+
| UpdateExpression
|
6312
|
+
| YieldExpression
|
6313
|
+
| MaybeNamedFunctionDeclaration
|
6314
|
+
| MaybeNamedClassDeclaration
|
6315
|
+
)
|
6316
|
+
],
|
6180
6317
|
boolean | void
|
6181
6318
|
>;
|
6182
6319
|
exportSpecifier: SyncBailHook<
|
@@ -6306,6 +6443,7 @@ declare class JavascriptParser extends Parser {
|
|
6306
6443
|
boolean | void
|
6307
6444
|
>;
|
6308
6445
|
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
6446
|
+
terminate: SyncBailHook<[ReturnStatement | ThrowStatement], boolean | void>;
|
6309
6447
|
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
6310
6448
|
}>;
|
6311
6449
|
sourceType: "module" | "auto" | "script";
|
@@ -6346,8 +6484,10 @@ declare class JavascriptParser extends Parser {
|
|
6346
6484
|
| UpdateExpression
|
6347
6485
|
| YieldExpression
|
6348
6486
|
| FunctionDeclaration
|
6487
|
+
| MaybeNamedFunctionDeclaration
|
6349
6488
|
| VariableDeclaration
|
6350
6489
|
| ClassDeclaration
|
6490
|
+
| MaybeNamedClassDeclaration
|
6351
6491
|
| ExpressionStatement
|
6352
6492
|
| BlockStatement
|
6353
6493
|
| StaticBlock
|
@@ -6372,7 +6512,7 @@ declare class JavascriptParser extends Parser {
|
|
6372
6512
|
Expression,
|
6373
6513
|
Set<DestructuringAssignmentProperty>
|
6374
6514
|
>;
|
6375
|
-
currentTagData
|
6515
|
+
currentTagData?: TagData;
|
6376
6516
|
magicCommentContext: Context;
|
6377
6517
|
destructuringAssignmentPropertiesFor(
|
6378
6518
|
node: Expression
|
@@ -6407,8 +6547,10 @@ declare class JavascriptParser extends Parser {
|
|
6407
6547
|
| UpdateExpression
|
6408
6548
|
| YieldExpression
|
6409
6549
|
| SpreadElement
|
6410
|
-
): undefined | string |
|
6411
|
-
walkClass(
|
6550
|
+
): undefined | string | VariableInfo;
|
6551
|
+
walkClass(
|
6552
|
+
classy: ClassExpression | ClassDeclaration | MaybeNamedClassDeclaration
|
6553
|
+
): void;
|
6412
6554
|
|
6413
6555
|
/**
|
6414
6556
|
* Pre walking iterates the scope for variable declarations
|
@@ -6521,8 +6663,10 @@ declare class JavascriptParser extends Parser {
|
|
6521
6663
|
| ExportNamedDeclarationJavascriptParser
|
6522
6664
|
| ExportAllDeclarationJavascriptParser
|
6523
6665
|
| FunctionDeclaration
|
6666
|
+
| MaybeNamedFunctionDeclaration
|
6524
6667
|
| VariableDeclaration
|
6525
6668
|
| ClassDeclaration
|
6669
|
+
| MaybeNamedClassDeclaration
|
6526
6670
|
| ExpressionStatement
|
6527
6671
|
| BlockStatement
|
6528
6672
|
| StaticBlock
|
@@ -6550,8 +6694,10 @@ declare class JavascriptParser extends Parser {
|
|
6550
6694
|
| ExportNamedDeclarationJavascriptParser
|
6551
6695
|
| ExportAllDeclarationJavascriptParser
|
6552
6696
|
| FunctionDeclaration
|
6697
|
+
| MaybeNamedFunctionDeclaration
|
6553
6698
|
| VariableDeclaration
|
6554
6699
|
| ClassDeclaration
|
6700
|
+
| MaybeNamedClassDeclaration
|
6555
6701
|
| ExpressionStatement
|
6556
6702
|
| BlockStatement
|
6557
6703
|
| StaticBlock
|
@@ -6579,8 +6725,10 @@ declare class JavascriptParser extends Parser {
|
|
6579
6725
|
| ExportNamedDeclarationJavascriptParser
|
6580
6726
|
| ExportAllDeclarationJavascriptParser
|
6581
6727
|
| FunctionDeclaration
|
6728
|
+
| MaybeNamedFunctionDeclaration
|
6582
6729
|
| VariableDeclaration
|
6583
6730
|
| ClassDeclaration
|
6731
|
+
| MaybeNamedClassDeclaration
|
6584
6732
|
| ExpressionStatement
|
6585
6733
|
| BlockStatement
|
6586
6734
|
| StaticBlock
|
@@ -6635,8 +6783,12 @@ declare class JavascriptParser extends Parser {
|
|
6635
6783
|
walkForInStatement(statement: ForInStatement): void;
|
6636
6784
|
preWalkForOfStatement(statement: ForOfStatement): void;
|
6637
6785
|
walkForOfStatement(statement: ForOfStatement): void;
|
6638
|
-
preWalkFunctionDeclaration(
|
6639
|
-
|
6786
|
+
preWalkFunctionDeclaration(
|
6787
|
+
statement: FunctionDeclaration | MaybeNamedFunctionDeclaration
|
6788
|
+
): void;
|
6789
|
+
walkFunctionDeclaration(
|
6790
|
+
statement: FunctionDeclaration | MaybeNamedFunctionDeclaration
|
6791
|
+
): void;
|
6640
6792
|
blockPreWalkExpressionStatement(statement: ExpressionStatement): void;
|
6641
6793
|
preWalkAssignmentExpression(expression: AssignmentExpression): void;
|
6642
6794
|
blockPreWalkImportDeclaration(
|
@@ -6644,7 +6796,7 @@ declare class JavascriptParser extends Parser {
|
|
6644
6796
|
): void;
|
6645
6797
|
enterDeclaration(
|
6646
6798
|
declaration: Declaration,
|
6647
|
-
onIdent: (
|
6799
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6648
6800
|
): void;
|
6649
6801
|
blockPreWalkExportNamedDeclaration(
|
6650
6802
|
statement: ExportNamedDeclarationJavascriptParser
|
@@ -6652,7 +6804,9 @@ declare class JavascriptParser extends Parser {
|
|
6652
6804
|
walkExportNamedDeclaration(
|
6653
6805
|
statement: ExportNamedDeclarationJavascriptParser
|
6654
6806
|
): void;
|
6655
|
-
blockPreWalkExportDefaultDeclaration(
|
6807
|
+
blockPreWalkExportDefaultDeclaration(
|
6808
|
+
statement: ExportDefaultDeclaration
|
6809
|
+
): void;
|
6656
6810
|
walkExportDefaultDeclaration(statement: ExportDefaultDeclaration): void;
|
6657
6811
|
blockPreWalkExportAllDeclaration(
|
6658
6812
|
statement: ExportAllDeclarationJavascriptParser
|
@@ -6661,8 +6815,12 @@ declare class JavascriptParser extends Parser {
|
|
6661
6815
|
blockPreWalkVariableDeclaration(statement: VariableDeclaration): void;
|
6662
6816
|
preWalkVariableDeclarator(declarator: VariableDeclarator): void;
|
6663
6817
|
walkVariableDeclaration(statement: VariableDeclaration): void;
|
6664
|
-
blockPreWalkClassDeclaration(
|
6665
|
-
|
6818
|
+
blockPreWalkClassDeclaration(
|
6819
|
+
statement: ClassDeclaration | MaybeNamedClassDeclaration
|
6820
|
+
): void;
|
6821
|
+
walkClassDeclaration(
|
6822
|
+
statement: ClassDeclaration | MaybeNamedClassDeclaration
|
6823
|
+
): void;
|
6666
6824
|
preWalkSwitchCases(switchCases: SwitchCase[]): void;
|
6667
6825
|
walkSwitchCases(switchCases: SwitchCase[]): void;
|
6668
6826
|
preWalkCatchClause(catchClause: CatchClause): void;
|
@@ -6705,7 +6863,39 @@ declare class JavascriptParser extends Parser {
|
|
6705
6863
|
| SpreadElement
|
6706
6864
|
)[]
|
6707
6865
|
): void;
|
6708
|
-
walkExpression(
|
6866
|
+
walkExpression(
|
6867
|
+
expression:
|
6868
|
+
| ImportExpressionImport
|
6869
|
+
| UnaryExpression
|
6870
|
+
| ArrayExpression
|
6871
|
+
| ArrowFunctionExpression
|
6872
|
+
| AssignmentExpression
|
6873
|
+
| AwaitExpression
|
6874
|
+
| BinaryExpression
|
6875
|
+
| SimpleCallExpression
|
6876
|
+
| NewExpression
|
6877
|
+
| ChainExpression
|
6878
|
+
| ClassExpression
|
6879
|
+
| ConditionalExpression
|
6880
|
+
| FunctionExpression
|
6881
|
+
| Identifier
|
6882
|
+
| SimpleLiteral
|
6883
|
+
| RegExpLiteral
|
6884
|
+
| BigIntLiteral
|
6885
|
+
| LogicalExpression
|
6886
|
+
| MemberExpression
|
6887
|
+
| MetaProperty
|
6888
|
+
| ObjectExpression
|
6889
|
+
| SequenceExpression
|
6890
|
+
| TaggedTemplateExpression
|
6891
|
+
| TemplateLiteral
|
6892
|
+
| ThisExpression
|
6893
|
+
| UpdateExpression
|
6894
|
+
| YieldExpression
|
6895
|
+
| SpreadElement
|
6896
|
+
| PrivateIdentifier
|
6897
|
+
| Super
|
6898
|
+
): void;
|
6709
6899
|
walkAwaitExpression(expression: AwaitExpression): void;
|
6710
6900
|
walkArrayExpression(expression: ArrayExpression): void;
|
6711
6901
|
walkSpreadElement(expression: SpreadElement): void;
|
@@ -6732,12 +6922,12 @@ declare class JavascriptParser extends Parser {
|
|
6732
6922
|
walkImportExpression(expression: ImportExpressionJavascriptParser): void;
|
6733
6923
|
walkCallExpression(expression: CallExpression): void;
|
6734
6924
|
walkMemberExpression(expression: MemberExpression): void;
|
6735
|
-
walkMemberExpressionWithExpressionName(
|
6736
|
-
expression:
|
6925
|
+
walkMemberExpressionWithExpressionName<R>(
|
6926
|
+
expression: MemberExpression,
|
6737
6927
|
name: string,
|
6738
6928
|
rootInfo: string | VariableInfo,
|
6739
6929
|
members: string[],
|
6740
|
-
onUnhandled
|
6930
|
+
onUnhandled: () => undefined | R
|
6741
6931
|
): void;
|
6742
6932
|
walkThisExpression(expression: ThisExpression): void;
|
6743
6933
|
walkIdentifier(expression: Identifier): void;
|
@@ -6809,11 +6999,11 @@ declare class JavascriptParser extends Parser {
|
|
6809
6999
|
fallback:
|
6810
7000
|
| undefined
|
6811
7001
|
| ((
|
6812
|
-
|
6813
|
-
|
6814
|
-
|
7002
|
+
name: string,
|
7003
|
+
rootInfo: string | VariableInfo | ScopeInfo,
|
7004
|
+
getMembers: () => string[]
|
6815
7005
|
) => any),
|
6816
|
-
defined: undefined | ((
|
7006
|
+
defined: undefined | ((result?: string) => undefined | R),
|
6817
7007
|
...args: AsArray<T>
|
6818
7008
|
): undefined | R;
|
6819
7009
|
callHooksForName<T, R>(
|
@@ -6829,18 +7019,31 @@ declare class JavascriptParser extends Parser {
|
|
6829
7019
|
callHooksForInfoWithFallback<T, R>(
|
6830
7020
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
6831
7021
|
info: ExportedVariableInfo,
|
6832
|
-
fallback: undefined | ((
|
6833
|
-
defined: undefined | ((
|
7022
|
+
fallback: undefined | ((name: string) => any),
|
7023
|
+
defined: undefined | ((result?: string) => any),
|
6834
7024
|
...args: AsArray<T>
|
6835
7025
|
): undefined | R;
|
6836
7026
|
callHooksForNameWithFallback<T, R>(
|
6837
7027
|
hookMap: HookMap<SyncBailHook<T, R>>,
|
6838
7028
|
name: string,
|
6839
|
-
fallback: undefined | ((
|
6840
|
-
defined: undefined | (() =>
|
7029
|
+
fallback: undefined | ((value: string) => undefined | R),
|
7030
|
+
defined: undefined | (() => R),
|
6841
7031
|
...args: AsArray<T>
|
6842
7032
|
): undefined | R;
|
6843
|
-
inScope(
|
7033
|
+
inScope(
|
7034
|
+
params: (
|
7035
|
+
| string
|
7036
|
+
| Identifier
|
7037
|
+
| MemberExpression
|
7038
|
+
| ObjectPattern
|
7039
|
+
| ArrayPattern
|
7040
|
+
| RestElement
|
7041
|
+
| AssignmentPattern
|
7042
|
+
| Property
|
7043
|
+
)[],
|
7044
|
+
fn: () => void
|
7045
|
+
): void;
|
7046
|
+
inExecutedPath(state: boolean, fn: () => void): void;
|
6844
7047
|
inClassScope(hasThis: boolean, params: Identifier[], fn: () => void): void;
|
6845
7048
|
inFunctionScope(
|
6846
7049
|
hasThis: boolean,
|
@@ -6855,7 +7058,7 @@ declare class JavascriptParser extends Parser {
|
|
6855
7058
|
)[],
|
6856
7059
|
fn: () => void
|
6857
7060
|
): void;
|
6858
|
-
inBlockScope(fn: () => void): void;
|
7061
|
+
inBlockScope(fn: () => void, inExecutedPath?: boolean): void;
|
6859
7062
|
detectMode(
|
6860
7063
|
statements: (
|
6861
7064
|
| ImportDeclarationJavascriptParser
|
@@ -6898,7 +7101,7 @@ declare class JavascriptParser extends Parser {
|
|
6898
7101
|
| AssignmentPattern
|
6899
7102
|
| Property
|
6900
7103
|
)[],
|
6901
|
-
onIdent: (
|
7104
|
+
onIdent: (ident: string) => void
|
6902
7105
|
): void;
|
6903
7106
|
enterPattern(
|
6904
7107
|
pattern:
|
@@ -6909,27 +7112,27 @@ declare class JavascriptParser extends Parser {
|
|
6909
7112
|
| RestElement
|
6910
7113
|
| AssignmentPattern
|
6911
7114
|
| Property,
|
6912
|
-
onIdent: (
|
7115
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6913
7116
|
): void;
|
6914
7117
|
enterIdentifier(
|
6915
7118
|
pattern: Identifier,
|
6916
|
-
onIdent: (
|
7119
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6917
7120
|
): void;
|
6918
7121
|
enterObjectPattern(
|
6919
7122
|
pattern: ObjectPattern,
|
6920
|
-
onIdent: (
|
7123
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6921
7124
|
): void;
|
6922
7125
|
enterArrayPattern(
|
6923
7126
|
pattern: ArrayPattern,
|
6924
|
-
onIdent: (
|
7127
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6925
7128
|
): void;
|
6926
7129
|
enterRestElement(
|
6927
7130
|
pattern: RestElement,
|
6928
|
-
onIdent: (
|
7131
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6929
7132
|
): void;
|
6930
7133
|
enterAssignmentPattern(
|
6931
7134
|
pattern: AssignmentPattern,
|
6932
|
-
onIdent: (
|
7135
|
+
onIdent: (ident: string, identifier: Identifier) => void
|
6933
7136
|
): void;
|
6934
7137
|
evaluateExpression(
|
6935
7138
|
expression:
|
@@ -6962,6 +7165,7 @@ declare class JavascriptParser extends Parser {
|
|
6962
7165
|
| YieldExpression
|
6963
7166
|
| SpreadElement
|
6964
7167
|
| PrivateIdentifier
|
7168
|
+
| Super
|
6965
7169
|
): BasicEvaluatedExpression;
|
6966
7170
|
parseString(expression: Expression): string;
|
6967
7171
|
parseCalculatedString(expression: Expression): {
|
@@ -7004,8 +7208,10 @@ declare class JavascriptParser extends Parser {
|
|
7004
7208
|
| YieldExpression
|
7005
7209
|
| PrivateIdentifier
|
7006
7210
|
| FunctionDeclaration
|
7211
|
+
| MaybeNamedFunctionDeclaration
|
7007
7212
|
| VariableDeclaration
|
7008
|
-
| ClassDeclaration
|
7213
|
+
| ClassDeclaration
|
7214
|
+
| MaybeNamedClassDeclaration,
|
7009
7215
|
commentsStartPos: number
|
7010
7216
|
): boolean;
|
7011
7217
|
getComments(range: [number, number]): Comment[];
|
@@ -7013,8 +7219,8 @@ declare class JavascriptParser extends Parser {
|
|
7013
7219
|
setAsiPosition(pos: number): void;
|
7014
7220
|
unsetAsiPosition(pos: number): void;
|
7015
7221
|
isStatementLevelExpression(expr: Expression): boolean;
|
7016
|
-
getTagData(name: string, tag: symbol):
|
7017
|
-
tagVariable(name: string, tag: symbol, data?:
|
7222
|
+
getTagData(name: string, tag: symbol): undefined | TagData;
|
7223
|
+
tagVariable(name: string, tag: symbol, data?: TagData): void;
|
7018
7224
|
defineVariable(name: string): void;
|
7019
7225
|
undefineVariable(name: string): void;
|
7020
7226
|
isVariableDefined(name: string): boolean;
|
@@ -7342,6 +7548,16 @@ declare interface JavascriptParserOptions {
|
|
7342
7548
|
*/
|
7343
7549
|
wrappedContextRegExp?: RegExp;
|
7344
7550
|
}
|
7551
|
+
|
7552
|
+
/**
|
7553
|
+
* Generator options for json modules.
|
7554
|
+
*/
|
7555
|
+
declare interface JsonGeneratorOptions {
|
7556
|
+
/**
|
7557
|
+
* Use `JSON.parse` when the JSON string is longer than 20 characters.
|
7558
|
+
*/
|
7559
|
+
JSONParse?: boolean;
|
7560
|
+
}
|
7345
7561
|
type JsonObjectFs = { [index: string]: JsonValueFs } & {
|
7346
7562
|
[index: string]:
|
7347
7563
|
| undefined
|
@@ -7481,6 +7697,10 @@ declare interface KnownAssetInfo {
|
|
7481
7697
|
declare interface KnownBuildInfo {
|
7482
7698
|
cacheable?: boolean;
|
7483
7699
|
parsed?: boolean;
|
7700
|
+
moduleArgument?: string;
|
7701
|
+
exportsArgument?: string;
|
7702
|
+
strict?: boolean;
|
7703
|
+
moduleConcatenationBailout?: string;
|
7484
7704
|
fileDependencies?: LazySet<string>;
|
7485
7705
|
contextDependencies?: LazySet<string>;
|
7486
7706
|
missingDependencies?: LazySet<string>;
|
@@ -7492,16 +7712,13 @@ declare interface KnownBuildInfo {
|
|
7492
7712
|
snapshot?: null | Snapshot;
|
7493
7713
|
}
|
7494
7714
|
declare interface KnownBuildMeta {
|
7495
|
-
moduleArgument?: string;
|
7496
|
-
exportsArgument?: string;
|
7497
|
-
strict?: boolean;
|
7498
|
-
moduleConcatenationBailout?: string;
|
7499
7715
|
exportsType?: "namespace" | "dynamic" | "default" | "flagged";
|
7500
7716
|
defaultObject?: false | "redirect" | "redirect-warn";
|
7501
7717
|
strictHarmonyModule?: boolean;
|
7502
7718
|
async?: boolean;
|
7503
7719
|
sideEffectFree?: boolean;
|
7504
7720
|
exportsFinalName?: Record<string, string>;
|
7721
|
+
isCSSModule?: boolean;
|
7505
7722
|
}
|
7506
7723
|
declare interface KnownCreateStatsOptionsContext {
|
7507
7724
|
forToString?: boolean;
|
@@ -7526,11 +7743,11 @@ declare interface KnownHooks {
|
|
7526
7743
|
declare interface KnownNormalizedStatsOptions {
|
7527
7744
|
context: string;
|
7528
7745
|
requestShortener: RequestShortener;
|
7529
|
-
chunksSort: string;
|
7530
|
-
modulesSort: string;
|
7531
|
-
chunkModulesSort: string;
|
7532
|
-
nestedModulesSort: string;
|
7533
|
-
assetsSort: string;
|
7746
|
+
chunksSort: string | false;
|
7747
|
+
modulesSort: string | false;
|
7748
|
+
chunkModulesSort: string | false;
|
7749
|
+
nestedModulesSort: string | false;
|
7750
|
+
assetsSort: string | false;
|
7534
7751
|
ids: boolean;
|
7535
7752
|
cachedAssets: boolean;
|
7536
7753
|
groupAssetsByEmitStatus: boolean;
|
@@ -7665,19 +7882,20 @@ declare interface KnownStatsError {
|
|
7665
7882
|
chunkId?: string | number;
|
7666
7883
|
moduleId?: string | number;
|
7667
7884
|
moduleTrace?: StatsModuleTraceItem[];
|
7668
|
-
details?:
|
7885
|
+
details?: string;
|
7669
7886
|
stack?: string;
|
7887
|
+
compilerPath?: string;
|
7670
7888
|
}
|
7671
7889
|
declare interface KnownStatsFactoryContext {
|
7672
7890
|
type: string;
|
7673
|
-
makePathsRelative: (
|
7891
|
+
makePathsRelative: (path: string) => string;
|
7674
7892
|
compilation: Compilation;
|
7675
7893
|
rootModules: Set<Module>;
|
7676
7894
|
compilationFileToChunks: Map<string, Chunk[]>;
|
7677
7895
|
compilationAuxiliaryFileToChunks: Map<string, Chunk[]>;
|
7678
7896
|
runtime: RuntimeSpec;
|
7679
|
-
cachedGetErrors: (
|
7680
|
-
cachedGetWarnings: (
|
7897
|
+
cachedGetErrors: (compilation: Compilation) => WebpackError[];
|
7898
|
+
cachedGetWarnings: (compilation: Compilation) => WebpackError[];
|
7681
7899
|
}
|
7682
7900
|
declare interface KnownStatsLogging {
|
7683
7901
|
entries: StatsLoggingEntry[];
|
@@ -7789,11 +8007,11 @@ declare interface KnownStatsPrinterContext {
|
|
7789
8007
|
moduleTraceItem?: StatsModuleTraceItem;
|
7790
8008
|
moduleTraceDependency?: StatsModuleTraceDependency;
|
7791
8009
|
}
|
7792
|
-
declare interface
|
8010
|
+
declare interface KnownStatsPrinterFormatters {
|
7793
8011
|
formatFilename?: (file: string, oversize?: boolean) => string;
|
7794
|
-
formatModuleId?: (id: string) => string;
|
8012
|
+
formatModuleId?: (id: string | number) => string;
|
7795
8013
|
formatChunkId?: (
|
7796
|
-
id: string,
|
8014
|
+
id: string | number,
|
7797
8015
|
direction?: "parent" | "child" | "sibling"
|
7798
8016
|
) => string;
|
7799
8017
|
formatSize?: (size: number) => string;
|
@@ -7815,27 +8033,40 @@ declare interface KnownStatsProfile {
|
|
7815
8033
|
factory: number;
|
7816
8034
|
dependencies: number;
|
7817
8035
|
}
|
8036
|
+
declare interface KnownUnsafeCacheData {
|
8037
|
+
/**
|
8038
|
+
* factory meta
|
8039
|
+
*/
|
8040
|
+
factoryMeta?: FactoryMeta;
|
8041
|
+
|
8042
|
+
/**
|
8043
|
+
* resolve options
|
8044
|
+
*/
|
8045
|
+
resolveOptions?: ResolveOptions;
|
8046
|
+
parserOptions?: ParserOptions;
|
8047
|
+
generatorOptions?: GeneratorOptions;
|
8048
|
+
}
|
7818
8049
|
declare interface LStatFs {
|
7819
8050
|
(
|
7820
8051
|
path: PathLikeFs,
|
7821
|
-
callback: (
|
8052
|
+
callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
|
7822
8053
|
): void;
|
7823
8054
|
(
|
7824
8055
|
path: PathLikeFs,
|
7825
8056
|
options: undefined | (StatOptions & { bigint?: false }),
|
7826
|
-
callback: (
|
8057
|
+
callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
|
7827
8058
|
): void;
|
7828
8059
|
(
|
7829
8060
|
path: PathLikeFs,
|
7830
8061
|
options: StatOptions & { bigint: true },
|
7831
|
-
callback: (
|
8062
|
+
callback: (err: null | NodeJS.ErrnoException, result?: IBigIntStats) => void
|
7832
8063
|
): void;
|
7833
8064
|
(
|
7834
8065
|
path: PathLikeFs,
|
7835
8066
|
options: undefined | StatOptions,
|
7836
8067
|
callback: (
|
7837
|
-
|
7838
|
-
|
8068
|
+
err: null | NodeJS.ErrnoException,
|
8069
|
+
result?: IStats | IBigIntStats
|
7839
8070
|
) => void
|
7840
8071
|
): void;
|
7841
8072
|
}
|
@@ -7908,8 +8139,8 @@ declare interface LazyCompilationDefaultBackendOptions {
|
|
7908
8139
|
* Specifies how to create the server handling the EventSource requests.
|
7909
8140
|
*/
|
7910
8141
|
server?:
|
7911
|
-
|
|
7912
|
-
|
|
8142
|
+
| ServerOptions<typeof IncomingMessage>
|
8143
|
+
| HttpsServerOptions
|
7913
8144
|
| (() => Server);
|
7914
8145
|
}
|
7915
8146
|
|
@@ -7951,9 +8182,9 @@ declare class LazySet<T> {
|
|
7951
8182
|
clear(): void;
|
7952
8183
|
delete(value: T): boolean;
|
7953
8184
|
entries(): IterableIterator<[T, T]>;
|
7954
|
-
forEach(
|
7955
|
-
callbackFn: (
|
7956
|
-
thisArg
|
8185
|
+
forEach<K>(
|
8186
|
+
callbackFn: (value: T, value2: T, set: Set<T>) => void,
|
8187
|
+
thisArg: K
|
7957
8188
|
): void;
|
7958
8189
|
has(item: T): boolean;
|
7959
8190
|
keys(): IterableIterator<T>;
|
@@ -8212,7 +8443,7 @@ declare interface LoaderDefinitionFunction<
|
|
8212
8443
|
}
|
8213
8444
|
declare interface LoaderItem {
|
8214
8445
|
loader: string;
|
8215
|
-
options
|
8446
|
+
options?: null | string | Record<string, any>;
|
8216
8447
|
ident: null | string;
|
8217
8448
|
type: null | string;
|
8218
8449
|
}
|
@@ -8509,8 +8740,8 @@ declare abstract class MainTemplate {
|
|
8509
8740
|
| string
|
8510
8741
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8511
8742
|
fn: (
|
8512
|
-
|
8513
|
-
|
8743
|
+
renderManifestEntries: RenderManifestEntry[],
|
8744
|
+
renderManifestOptions: RenderManifestOptions
|
8514
8745
|
) => RenderManifestEntry[]
|
8515
8746
|
) => void;
|
8516
8747
|
};
|
@@ -8521,7 +8752,10 @@ declare abstract class MainTemplate {
|
|
8521
8752
|
options:
|
8522
8753
|
| string
|
8523
8754
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8524
|
-
fn: (
|
8755
|
+
fn: (
|
8756
|
+
value: string,
|
8757
|
+
renderBootstrapContext: RenderBootstrapContext
|
8758
|
+
) => string
|
8525
8759
|
) => void;
|
8526
8760
|
};
|
8527
8761
|
beforeStartup: { tap: () => never };
|
@@ -8533,11 +8767,11 @@ declare abstract class MainTemplate {
|
|
8533
8767
|
| string
|
8534
8768
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8535
8769
|
fn: (
|
8536
|
-
|
8537
|
-
|
8538
|
-
|
8539
|
-
|
8540
|
-
|
8770
|
+
source: Source,
|
8771
|
+
chunk: Chunk,
|
8772
|
+
hash: undefined | string,
|
8773
|
+
moduleTemplate: ModuleTemplate,
|
8774
|
+
dependencyTemplates: DependencyTemplates
|
8541
8775
|
) => Source
|
8542
8776
|
) => void;
|
8543
8777
|
};
|
@@ -8546,7 +8780,7 @@ declare abstract class MainTemplate {
|
|
8546
8780
|
options:
|
8547
8781
|
| string
|
8548
8782
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8549
|
-
fn: (
|
8783
|
+
fn: (source: Source, chunk: Chunk, hash?: string) => Source
|
8550
8784
|
) => void;
|
8551
8785
|
};
|
8552
8786
|
assetPath: {
|
@@ -8554,7 +8788,7 @@ declare abstract class MainTemplate {
|
|
8554
8788
|
options:
|
8555
8789
|
| string
|
8556
8790
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8557
|
-
fn: (
|
8791
|
+
fn: (value: string, path: PathData, assetInfo?: AssetInfo) => string
|
8558
8792
|
) => void;
|
8559
8793
|
call: (filename: TemplatePath, options: PathData) => string;
|
8560
8794
|
};
|
@@ -8563,7 +8797,7 @@ declare abstract class MainTemplate {
|
|
8563
8797
|
options:
|
8564
8798
|
| string
|
8565
8799
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8566
|
-
fn: (
|
8800
|
+
fn: (hash: Hash) => void
|
8567
8801
|
) => void;
|
8568
8802
|
};
|
8569
8803
|
hashForChunk: {
|
@@ -8571,7 +8805,7 @@ declare abstract class MainTemplate {
|
|
8571
8805
|
options:
|
8572
8806
|
| string
|
8573
8807
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
8574
|
-
fn: (
|
8808
|
+
fn: (hash: Hash, chunk: Chunk) => void
|
8575
8809
|
) => void;
|
8576
8810
|
};
|
8577
8811
|
globalHashPaths: { tap: () => void };
|
@@ -8680,7 +8914,7 @@ declare interface Mkdir {
|
|
8680
8914
|
(
|
8681
8915
|
file: PathLikeFs,
|
8682
8916
|
options: MakeDirectoryOptions & { recursive: true },
|
8683
|
-
callback: (
|
8917
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
8684
8918
|
): void;
|
8685
8919
|
(
|
8686
8920
|
file: PathLikeFs,
|
@@ -8690,16 +8924,16 @@ declare interface Mkdir {
|
|
8690
8924
|
| string
|
8691
8925
|
| number
|
8692
8926
|
| (MakeDirectoryOptions & { recursive?: false }),
|
8693
|
-
callback: (
|
8927
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
8694
8928
|
): void;
|
8695
8929
|
(
|
8696
8930
|
file: PathLikeFs,
|
8697
8931
|
options: undefined | null | string | number | MakeDirectoryOptions,
|
8698
|
-
callback: (
|
8932
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
8699
8933
|
): void;
|
8700
8934
|
(
|
8701
8935
|
file: PathLikeFs,
|
8702
|
-
callback: (
|
8936
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
8703
8937
|
): void;
|
8704
8938
|
}
|
8705
8939
|
declare interface MkdirSync {
|
@@ -8796,7 +9030,7 @@ declare class Module extends DependenciesBlock {
|
|
8796
9030
|
hasReasons(moduleGraph: ModuleGraph, runtime: RuntimeSpec): boolean;
|
8797
9031
|
needBuild(
|
8798
9032
|
context: NeedBuildContext,
|
8799
|
-
callback: (
|
9033
|
+
callback: (err?: null | WebpackError, needBuild?: boolean) => void
|
8800
9034
|
): void;
|
8801
9035
|
needRebuild(
|
8802
9036
|
fileTimestamps: Map<string, null | number>,
|
@@ -8810,7 +9044,7 @@ declare class Module extends DependenciesBlock {
|
|
8810
9044
|
compilation: Compilation,
|
8811
9045
|
resolver: ResolverWithOptions,
|
8812
9046
|
fs: InputFileSystem,
|
8813
|
-
callback: (
|
9047
|
+
callback: (err?: WebpackError) => void
|
8814
9048
|
): void;
|
8815
9049
|
getSourceTypes(): ReadonlySet<string>;
|
8816
9050
|
source(
|
@@ -8907,7 +9141,7 @@ declare class ModuleDependency extends Dependency {
|
|
8907
9141
|
declare abstract class ModuleFactory {
|
8908
9142
|
create(
|
8909
9143
|
data: ModuleFactoryCreateData,
|
8910
|
-
callback: (
|
9144
|
+
callback: (err?: null | Error, result?: ModuleFactoryResult) => void
|
8911
9145
|
): void;
|
8912
9146
|
}
|
8913
9147
|
declare interface ModuleFactoryCreateData {
|
@@ -8919,7 +9153,7 @@ declare interface ModuleFactoryCreateData {
|
|
8919
9153
|
declare interface ModuleFactoryCreateDataContextInfo {
|
8920
9154
|
issuer: string;
|
8921
9155
|
issuerLayer?: null | string;
|
8922
|
-
compiler
|
9156
|
+
compiler?: string;
|
8923
9157
|
}
|
8924
9158
|
declare interface ModuleFactoryResult {
|
8925
9159
|
/**
|
@@ -9051,12 +9285,12 @@ declare class ModuleGraph {
|
|
9051
9285
|
moveModuleConnections(
|
9052
9286
|
oldModule: Module,
|
9053
9287
|
newModule: Module,
|
9054
|
-
filterConnection: (
|
9288
|
+
filterConnection: (moduleGraphConnection: ModuleGraphConnection) => boolean
|
9055
9289
|
): void;
|
9056
9290
|
copyOutgoingModuleConnections(
|
9057
9291
|
oldModule: Module,
|
9058
9292
|
newModule: Module,
|
9059
|
-
filterConnection: (
|
9293
|
+
filterConnection: (moduleGraphConnection: ModuleGraphConnection) => boolean
|
9060
9294
|
): void;
|
9061
9295
|
addExtraReason(module: Module, explanation: string): void;
|
9062
9296
|
getResolvedModule(dependency: Dependency): null | Module;
|
@@ -9103,13 +9337,13 @@ declare class ModuleGraph {
|
|
9103
9337
|
setDepthIfLower(module: Module, depth: number): boolean;
|
9104
9338
|
isAsync(module: Module): boolean;
|
9105
9339
|
setAsync(module: Module): void;
|
9106
|
-
getMeta(thing
|
9107
|
-
getMetaIfExisting(thing
|
9340
|
+
getMeta(thing: object): any;
|
9341
|
+
getMetaIfExisting(thing: object): any;
|
9108
9342
|
freeze(cacheStage?: string): void;
|
9109
9343
|
unfreeze(): void;
|
9110
|
-
cached<T
|
9111
|
-
fn: (moduleGraph: ModuleGraph, ...args: T) => V,
|
9112
|
-
...args: T
|
9344
|
+
cached<T, V>(
|
9345
|
+
fn: (moduleGraph: ModuleGraph, ...args: T[]) => V,
|
9346
|
+
...args: T[]
|
9113
9347
|
): V;
|
9114
9348
|
setModuleMemCaches(
|
9115
9349
|
moduleMemCaches: Map<Module, WeakTupleMap<any, any>>
|
@@ -9137,7 +9371,10 @@ declare class ModuleGraphConnection {
|
|
9137
9371
|
condition?:
|
9138
9372
|
| null
|
9139
9373
|
| false
|
9140
|
-
| ((
|
9374
|
+
| ((
|
9375
|
+
moduleGraphConnection: ModuleGraphConnection,
|
9376
|
+
runtime: RuntimeSpec
|
9377
|
+
) => ConnectionState)
|
9141
9378
|
);
|
9142
9379
|
originModule: null | Module;
|
9143
9380
|
resolvedOriginModule: null | Module;
|
@@ -9147,15 +9384,15 @@ declare class ModuleGraphConnection {
|
|
9147
9384
|
weak: boolean;
|
9148
9385
|
conditional: boolean;
|
9149
9386
|
condition?: (
|
9150
|
-
|
9151
|
-
|
9387
|
+
moduleGraphConnection: ModuleGraphConnection,
|
9388
|
+
runtime: RuntimeSpec
|
9152
9389
|
) => ConnectionState;
|
9153
9390
|
explanations?: Set<string>;
|
9154
9391
|
clone(): ModuleGraphConnection;
|
9155
9392
|
addCondition(
|
9156
9393
|
condition: (
|
9157
|
-
|
9158
|
-
|
9394
|
+
moduleGraphConnection: ModuleGraphConnection,
|
9395
|
+
runtime: RuntimeSpec
|
9159
9396
|
) => ConnectionState
|
9160
9397
|
): void;
|
9161
9398
|
addExplanation(explanation: string): void;
|
@@ -9177,12 +9414,7 @@ type ModuleInfo = ConcatenatedModuleInfo | ExternalModuleInfo;
|
|
9177
9414
|
declare interface ModuleMemCachesItem {
|
9178
9415
|
buildInfo: BuildInfo;
|
9179
9416
|
references?: WeakMap<Dependency, Module>;
|
9180
|
-
memCache: WeakTupleMap<
|
9181
|
-
}
|
9182
|
-
declare interface ModuleObject {
|
9183
|
-
id: string;
|
9184
|
-
exports: any;
|
9185
|
-
loaded: boolean;
|
9417
|
+
memCache: WeakTupleMap<Module[], string>;
|
9186
9418
|
}
|
9187
9419
|
|
9188
9420
|
/**
|
@@ -9322,7 +9554,7 @@ declare interface ModuleOptionsNormalized {
|
|
9322
9554
|
declare interface ModulePathData {
|
9323
9555
|
id: string | number;
|
9324
9556
|
hash: string;
|
9325
|
-
hashWithLength?: (
|
9557
|
+
hashWithLength?: (length: number) => string;
|
9326
9558
|
}
|
9327
9559
|
declare abstract class ModuleProfile {
|
9328
9560
|
startTime: number;
|
@@ -9432,10 +9664,10 @@ declare abstract class ModuleTemplate {
|
|
9432
9664
|
| string
|
9433
9665
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
9434
9666
|
fn: (
|
9435
|
-
|
9436
|
-
|
9437
|
-
|
9438
|
-
|
9667
|
+
source: Source,
|
9668
|
+
module: Module,
|
9669
|
+
chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
|
9670
|
+
dependencyTemplates: DependencyTemplates
|
9439
9671
|
) => Source
|
9440
9672
|
) => void;
|
9441
9673
|
};
|
@@ -9445,10 +9677,10 @@ declare abstract class ModuleTemplate {
|
|
9445
9677
|
| string
|
9446
9678
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
9447
9679
|
fn: (
|
9448
|
-
|
9449
|
-
|
9450
|
-
|
9451
|
-
|
9680
|
+
source: Source,
|
9681
|
+
module: Module,
|
9682
|
+
chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
|
9683
|
+
dependencyTemplates: DependencyTemplates
|
9452
9684
|
) => Source
|
9453
9685
|
) => void;
|
9454
9686
|
};
|
@@ -9458,10 +9690,10 @@ declare abstract class ModuleTemplate {
|
|
9458
9690
|
| string
|
9459
9691
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
9460
9692
|
fn: (
|
9461
|
-
|
9462
|
-
|
9463
|
-
|
9464
|
-
|
9693
|
+
source: Source,
|
9694
|
+
module: Module,
|
9695
|
+
chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
|
9696
|
+
dependencyTemplates: DependencyTemplates
|
9465
9697
|
) => Source
|
9466
9698
|
) => void;
|
9467
9699
|
};
|
@@ -9471,10 +9703,10 @@ declare abstract class ModuleTemplate {
|
|
9471
9703
|
| string
|
9472
9704
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
9473
9705
|
fn: (
|
9474
|
-
|
9475
|
-
|
9476
|
-
|
9477
|
-
|
9706
|
+
source: Source,
|
9707
|
+
module: Module,
|
9708
|
+
chunkRenderContext: ChunkRenderContextJavascriptModulesPlugin,
|
9709
|
+
dependencyTemplates: DependencyTemplates
|
9478
9710
|
) => Source
|
9479
9711
|
) => void;
|
9480
9712
|
};
|
@@ -9483,7 +9715,7 @@ declare abstract class ModuleTemplate {
|
|
9483
9715
|
options:
|
9484
9716
|
| string
|
9485
9717
|
| (TapOptions & { name: string } & IfSet<AdditionalOptions>),
|
9486
|
-
fn: (
|
9718
|
+
fn: (hash: Hash) => void
|
9487
9719
|
) => void;
|
9488
9720
|
};
|
9489
9721
|
}>;
|
@@ -9503,7 +9735,9 @@ declare class MultiCompiler {
|
|
9503
9735
|
run: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
9504
9736
|
watchClose: SyncHook<[]>;
|
9505
9737
|
watchRun: MultiHook<AsyncSeriesHook<[Compiler]>>;
|
9506
|
-
infrastructureLog: MultiHook<
|
9738
|
+
infrastructureLog: MultiHook<
|
9739
|
+
SyncBailHook<[string, string, undefined | any[]], true | void>
|
9740
|
+
>;
|
9507
9741
|
}>;
|
9508
9742
|
compilers: Compiler[];
|
9509
9743
|
dependencies: WeakMap<Compiler, string[]>;
|
@@ -9601,6 +9835,9 @@ declare interface NeedBuildContext {
|
|
9601
9835
|
fileSystemInfo: FileSystemInfo;
|
9602
9836
|
valueCacheVersions: Map<string, string | Set<string>>;
|
9603
9837
|
}
|
9838
|
+
declare interface NewContentCreateContextMap {
|
9839
|
+
[index: string]: string;
|
9840
|
+
}
|
9604
9841
|
declare class NoEmitOnErrorsPlugin {
|
9605
9842
|
constructor();
|
9606
9843
|
|
@@ -9611,24 +9848,20 @@ declare class NoEmitOnErrorsPlugin {
|
|
9611
9848
|
}
|
9612
9849
|
type Node = false | NodeOptions;
|
9613
9850
|
declare class NodeEnvironmentPlugin {
|
9614
|
-
constructor(options:
|
9615
|
-
|
9616
|
-
* infrastructure logging options
|
9617
|
-
*/
|
9618
|
-
infrastructureLogging: InfrastructureLogging;
|
9619
|
-
});
|
9620
|
-
options: {
|
9621
|
-
/**
|
9622
|
-
* infrastructure logging options
|
9623
|
-
*/
|
9624
|
-
infrastructureLogging: InfrastructureLogging;
|
9625
|
-
};
|
9851
|
+
constructor(options: NodeEnvironmentPluginOptions);
|
9852
|
+
options: NodeEnvironmentPluginOptions;
|
9626
9853
|
|
9627
9854
|
/**
|
9628
9855
|
* Apply the plugin
|
9629
9856
|
*/
|
9630
9857
|
apply(compiler: Compiler): void;
|
9631
9858
|
}
|
9859
|
+
declare interface NodeEnvironmentPluginOptions {
|
9860
|
+
/**
|
9861
|
+
* infrastructure logging options
|
9862
|
+
*/
|
9863
|
+
infrastructureLogging: InfrastructureLogging;
|
9864
|
+
}
|
9632
9865
|
|
9633
9866
|
/**
|
9634
9867
|
* Options object for node compatibility features.
|
@@ -9690,7 +9923,7 @@ declare class NormalModule extends Module {
|
|
9690
9923
|
generator?: Generator;
|
9691
9924
|
generatorOptions?: GeneratorOptions;
|
9692
9925
|
resource: string;
|
9693
|
-
resourceResolveData
|
9926
|
+
resourceResolveData: any;
|
9694
9927
|
matchResource?: string;
|
9695
9928
|
loaders: LoaderItem[];
|
9696
9929
|
error: null | WebpackError;
|
@@ -9699,7 +9932,7 @@ declare class NormalModule extends Module {
|
|
9699
9932
|
* restore unsafe cache data
|
9700
9933
|
*/
|
9701
9934
|
restoreFromUnsafeCache(
|
9702
|
-
unsafeCacheData:
|
9935
|
+
unsafeCacheData: UnsafeCacheData,
|
9703
9936
|
normalModuleFactory: NormalModuleFactory
|
9704
9937
|
): void;
|
9705
9938
|
createSourceForAsset(
|
@@ -9742,6 +9975,9 @@ declare interface NormalModuleCompilationHooks {
|
|
9742
9975
|
null | string | Buffer
|
9743
9976
|
>
|
9744
9977
|
>;
|
9978
|
+
processResult: SyncWaterfallHook<
|
9979
|
+
[[string | Buffer, string | SourceMapSource, PreparsedAst], NormalModule]
|
9980
|
+
>;
|
9745
9981
|
needBuild: AsyncSeriesBailHook<[NormalModule, NeedBuildContext], boolean>;
|
9746
9982
|
}
|
9747
9983
|
declare interface NormalModuleCreateData {
|
@@ -9783,7 +10019,7 @@ declare interface NormalModuleCreateData {
|
|
9783
10019
|
/**
|
9784
10020
|
* resource resolve data
|
9785
10021
|
*/
|
9786
|
-
resourceResolveData?:
|
10022
|
+
resourceResolveData?: any;
|
9787
10023
|
|
9788
10024
|
/**
|
9789
10025
|
* context directory for resolving
|
@@ -9858,8 +10094,8 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|
9858
10094
|
ruleSet: RuleSet;
|
9859
10095
|
context: string;
|
9860
10096
|
fs: InputFileSystem;
|
9861
|
-
parserCache: Map<string, WeakMap<
|
9862
|
-
generatorCache: Map<string, WeakMap<
|
10097
|
+
parserCache: Map<string, WeakMap<ParserOptions, Parser>>;
|
10098
|
+
generatorCache: Map<string, WeakMap<GeneratorOptions, Generator>>;
|
9863
10099
|
cleanupForCache(): void;
|
9864
10100
|
resolveResource(
|
9865
10101
|
contextInfo: ModuleFactoryCreateDataContextInfo,
|
@@ -9953,22 +10189,16 @@ declare class NormalModuleReplacementPlugin {
|
|
9953
10189
|
*/
|
9954
10190
|
constructor(
|
9955
10191
|
resourceRegExp: RegExp,
|
9956
|
-
newResource: string | ((
|
10192
|
+
newResource: string | ((resolveData: ResolveData) => void)
|
9957
10193
|
);
|
9958
10194
|
resourceRegExp: RegExp;
|
9959
|
-
newResource: string | ((
|
10195
|
+
newResource: string | ((resolveData: ResolveData) => void);
|
9960
10196
|
|
9961
10197
|
/**
|
9962
10198
|
* Apply the plugin
|
9963
10199
|
*/
|
9964
10200
|
apply(compiler: Compiler): void;
|
9965
10201
|
}
|
9966
|
-
type NormalModuleUnsafeCacheData = UnsafeCacheData & {
|
9967
|
-
parser?: Parser;
|
9968
|
-
parserOptions?: ParserOptions;
|
9969
|
-
generator?: Generator;
|
9970
|
-
generatorOptions?: GeneratorOptions;
|
9971
|
-
};
|
9972
10202
|
type NormalizedStatsOptions = KnownNormalizedStatsOptions &
|
9973
10203
|
Omit<
|
9974
10204
|
StatsOptions,
|
@@ -10024,7 +10254,7 @@ declare class NullDependencyTemplate extends DependencyTemplate {
|
|
10024
10254
|
}
|
10025
10255
|
declare interface ObjectDeserializerContext {
|
10026
10256
|
read: () => any;
|
10027
|
-
setCircularReference: (
|
10257
|
+
setCircularReference: (value?: any) => void;
|
10028
10258
|
}
|
10029
10259
|
declare interface ObjectEncodingOptions {
|
10030
10260
|
encoding?:
|
@@ -10036,24 +10266,34 @@ declare interface ObjectEncodingOptions {
|
|
10036
10266
|
| "utf-16le"
|
10037
10267
|
| "ucs2"
|
10038
10268
|
| "ucs-2"
|
10039
|
-
| "latin1"
|
10040
|
-
| "binary"
|
10041
10269
|
| "base64"
|
10042
10270
|
| "base64url"
|
10271
|
+
| "latin1"
|
10272
|
+
| "binary"
|
10043
10273
|
| "hex";
|
10044
10274
|
}
|
10045
10275
|
declare interface ObjectForExtract {
|
10046
10276
|
[index: string]: any;
|
10047
10277
|
}
|
10048
10278
|
declare interface ObjectSerializer {
|
10049
|
-
serialize: (
|
10050
|
-
deserialize: (
|
10279
|
+
serialize: (value: any, context: ObjectSerializerContext) => void;
|
10280
|
+
deserialize: (context: ObjectDeserializerContext) => any;
|
10051
10281
|
}
|
10052
10282
|
declare interface ObjectSerializerContext {
|
10053
|
-
write: (
|
10054
|
-
|
10055
|
-
|
10056
|
-
|
10283
|
+
write: (value?: any) => void;
|
10284
|
+
setCircularReference: (value?: any) => void;
|
10285
|
+
snapshot: () => ObjectSerializerSnapshot;
|
10286
|
+
rollback: (snapshot: ObjectSerializerSnapshot) => void;
|
10287
|
+
writeLazy?: (item?: any) => void;
|
10288
|
+
writeSeparate?: (item?: any, obj?: any) => () => any;
|
10289
|
+
}
|
10290
|
+
declare interface ObjectSerializerSnapshot {
|
10291
|
+
length: number;
|
10292
|
+
cycleStackSize: number;
|
10293
|
+
referenceableSize: number;
|
10294
|
+
currentPos: number;
|
10295
|
+
objectTypeLookupSize: number;
|
10296
|
+
currentPosTypeLookup: number;
|
10057
10297
|
}
|
10058
10298
|
declare class OccurrenceChunkIdsPlugin {
|
10059
10299
|
constructor(options?: OccurrenceChunkIdsPluginOptions);
|
@@ -10090,16 +10330,16 @@ declare interface Open {
|
|
10090
10330
|
file: PathLikeFs,
|
10091
10331
|
flags: undefined | string | number,
|
10092
10332
|
mode: undefined | null | string | number,
|
10093
|
-
callback: (
|
10333
|
+
callback: (err: null | NodeJS.ErrnoException, result?: number) => void
|
10094
10334
|
): void;
|
10095
10335
|
(
|
10096
10336
|
file: PathLikeFs,
|
10097
10337
|
flags: undefined | string | number,
|
10098
|
-
callback: (
|
10338
|
+
callback: (err: null | NodeJS.ErrnoException, result?: number) => void
|
10099
10339
|
): void;
|
10100
10340
|
(
|
10101
10341
|
file: PathLikeFs,
|
10102
|
-
callback: (
|
10342
|
+
callback: (err: null | NodeJS.ErrnoException, result?: number) => void
|
10103
10343
|
): void;
|
10104
10344
|
}
|
10105
10345
|
|
@@ -10289,7 +10529,7 @@ declare interface OptimizationSplitChunksCacheGroup {
|
|
10289
10529
|
/**
|
10290
10530
|
* Assign modules to a cache group by module layer.
|
10291
10531
|
*/
|
10292
|
-
layer?: string |
|
10532
|
+
layer?: string | RegExp | ((layer: null | string) => boolean);
|
10293
10533
|
|
10294
10534
|
/**
|
10295
10535
|
* Maximum number of requests which are accepted for on-demand loading.
|
@@ -10339,7 +10579,10 @@ declare interface OptimizationSplitChunksCacheGroup {
|
|
10339
10579
|
/**
|
10340
10580
|
* Give chunks for this cache group a name (chunks with equal name are merged).
|
10341
10581
|
*/
|
10342
|
-
name?:
|
10582
|
+
name?:
|
10583
|
+
| string
|
10584
|
+
| false
|
10585
|
+
| ((module: Module, chunks: Chunk[], key: string) => undefined | string);
|
10343
10586
|
|
10344
10587
|
/**
|
10345
10588
|
* Priority of this cache group.
|
@@ -10354,12 +10597,15 @@ declare interface OptimizationSplitChunksCacheGroup {
|
|
10354
10597
|
/**
|
10355
10598
|
* Assign modules to a cache group by module name.
|
10356
10599
|
*/
|
10357
|
-
test?:
|
10600
|
+
test?:
|
10601
|
+
| string
|
10602
|
+
| RegExp
|
10603
|
+
| ((module: Module, context: CacheGroupsContext) => boolean);
|
10358
10604
|
|
10359
10605
|
/**
|
10360
10606
|
* Assign modules to a cache group by module type.
|
10361
10607
|
*/
|
10362
|
-
type?: string |
|
10608
|
+
type?: string | RegExp | ((type: string) => boolean);
|
10363
10609
|
|
10364
10610
|
/**
|
10365
10611
|
* Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
|
@@ -10495,7 +10741,10 @@ declare interface OptimizationSplitChunksOptions {
|
|
10495
10741
|
/**
|
10496
10742
|
* Give chunks created a name (chunks with equal name are merged).
|
10497
10743
|
*/
|
10498
|
-
name?:
|
10744
|
+
name?:
|
10745
|
+
| string
|
10746
|
+
| false
|
10747
|
+
| ((module: Module, chunks: Chunk[], key: string) => undefined | string);
|
10499
10748
|
|
10500
10749
|
/**
|
10501
10750
|
* Compare used exports when checking common modules. Modules will only be put in the same chunk when exports are equal.
|
@@ -10644,12 +10893,12 @@ declare interface Output {
|
|
10644
10893
|
/**
|
10645
10894
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
10646
10895
|
*/
|
10647
|
-
devtoolFallbackModuleFilenameTemplate?: string |
|
10896
|
+
devtoolFallbackModuleFilenameTemplate?: string | ((context?: any) => string);
|
10648
10897
|
|
10649
10898
|
/**
|
10650
10899
|
* Filename template string of function for the sources array in a generated SourceMap.
|
10651
10900
|
*/
|
10652
|
-
devtoolModuleFilenameTemplate?: string |
|
10901
|
+
devtoolModuleFilenameTemplate?: string | ((context?: any) => string);
|
10653
10902
|
|
10654
10903
|
/**
|
10655
10904
|
* Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
|
@@ -10847,15 +11096,15 @@ declare interface OutputFileSystem {
|
|
10847
11096
|
readdir?: ReaddirFs;
|
10848
11097
|
rmdir?: Rmdir;
|
10849
11098
|
unlink?: (
|
10850
|
-
|
10851
|
-
|
11099
|
+
pathLike: PathLikeFs,
|
11100
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
10852
11101
|
) => void;
|
10853
11102
|
stat: StatFs;
|
10854
11103
|
lstat?: LStatFs;
|
10855
11104
|
readFile: ReadFileFs;
|
10856
|
-
join?: (
|
10857
|
-
relative?: (
|
10858
|
-
dirname?: (
|
11105
|
+
join?: (path1: string, path2: string) => string;
|
11106
|
+
relative?: (from: string, to: string) => string;
|
11107
|
+
dirname?: (dirname: string) => string;
|
10859
11108
|
}
|
10860
11109
|
|
10861
11110
|
/**
|
@@ -10938,12 +11187,12 @@ declare interface OutputNormalized {
|
|
10938
11187
|
/**
|
10939
11188
|
* Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.
|
10940
11189
|
*/
|
10941
|
-
devtoolFallbackModuleFilenameTemplate?: string |
|
11190
|
+
devtoolFallbackModuleFilenameTemplate?: string | ((context?: any) => string);
|
10942
11191
|
|
10943
11192
|
/**
|
10944
11193
|
* Filename template string of function for the sources array in a generated SourceMap.
|
10945
11194
|
*/
|
10946
|
-
devtoolModuleFilenameTemplate?: string |
|
11195
|
+
devtoolModuleFilenameTemplate?: string | ((context?: any) => string);
|
10947
11196
|
|
10948
11197
|
/**
|
10949
11198
|
* Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.
|
@@ -11120,8 +11369,8 @@ declare interface OutputNormalized {
|
|
11120
11369
|
*/
|
11121
11370
|
workerWasmLoading?: string | false;
|
11122
11371
|
}
|
11123
|
-
declare interface ParameterizedComparator<TArg, T> {
|
11124
|
-
(
|
11372
|
+
declare interface ParameterizedComparator<TArg extends object, T> {
|
11373
|
+
(tArg: TArg): Comparator<T>;
|
11125
11374
|
}
|
11126
11375
|
declare interface ParsedIdentifier {
|
11127
11376
|
request: string;
|
@@ -11222,12 +11471,12 @@ declare interface ParserStateBase {
|
|
11222
11471
|
current: NormalModule;
|
11223
11472
|
module: NormalModule;
|
11224
11473
|
compilation: Compilation;
|
11225
|
-
options:
|
11474
|
+
options: WebpackOptionsNormalized;
|
11226
11475
|
}
|
11227
11476
|
declare interface PathData {
|
11228
11477
|
chunkGraph?: ChunkGraph;
|
11229
11478
|
hash?: string;
|
11230
|
-
hashWithLength?: (
|
11479
|
+
hashWithLength?: (length: number) => string;
|
11231
11480
|
chunk?: Chunk | ChunkPathData;
|
11232
11481
|
module?: Module | ModulePathData;
|
11233
11482
|
runtime?: RuntimeSpec;
|
@@ -11236,12 +11485,12 @@ declare interface PathData {
|
|
11236
11485
|
query?: string;
|
11237
11486
|
contentHashType?: string;
|
11238
11487
|
contentHash?: string;
|
11239
|
-
contentHashWithLength?: (
|
11488
|
+
contentHashWithLength?: (length: number) => string;
|
11240
11489
|
noChunkHash?: boolean;
|
11241
11490
|
url?: string;
|
11242
11491
|
}
|
11243
11492
|
type PathLikeFs = string | Buffer | URL;
|
11244
|
-
type PathLikeTypes = string |
|
11493
|
+
type PathLikeTypes = string | URL_url | Buffer;
|
11245
11494
|
type PathOrFileDescriptorFs = string | number | Buffer | URL;
|
11246
11495
|
type PathOrFileDescriptorTypes = string | number | Buffer | URL_url;
|
11247
11496
|
type Pattern =
|
@@ -11304,32 +11553,32 @@ declare interface PlatformTargetProperties {
|
|
11304
11553
|
/**
|
11305
11554
|
* web platform, importing of http(s) and std: is available
|
11306
11555
|
*/
|
11307
|
-
web
|
11556
|
+
web?: null | boolean;
|
11308
11557
|
|
11309
11558
|
/**
|
11310
11559
|
* browser platform, running in a normal web browser
|
11311
11560
|
*/
|
11312
|
-
browser
|
11561
|
+
browser?: null | boolean;
|
11313
11562
|
|
11314
11563
|
/**
|
11315
11564
|
* (Web)Worker platform, running in a web/shared/service worker
|
11316
11565
|
*/
|
11317
|
-
webworker
|
11566
|
+
webworker?: null | boolean;
|
11318
11567
|
|
11319
11568
|
/**
|
11320
11569
|
* node platform, require of node built-in modules is available
|
11321
11570
|
*/
|
11322
|
-
node
|
11571
|
+
node?: null | boolean;
|
11323
11572
|
|
11324
11573
|
/**
|
11325
11574
|
* nwjs platform, require of legacy nw.gui is available
|
11326
11575
|
*/
|
11327
|
-
nwjs
|
11576
|
+
nwjs?: null | boolean;
|
11328
11577
|
|
11329
11578
|
/**
|
11330
11579
|
* electron platform, require of some electron built-in modules is available
|
11331
11580
|
*/
|
11332
|
-
electron
|
11581
|
+
electron?: null | boolean;
|
11333
11582
|
}
|
11334
11583
|
type Plugin =
|
11335
11584
|
| undefined
|
@@ -11372,7 +11621,7 @@ declare interface Problem {
|
|
11372
11621
|
type: ProblemType;
|
11373
11622
|
path: string;
|
11374
11623
|
argument: string;
|
11375
|
-
value?:
|
11624
|
+
value?: string | number | boolean | RegExp;
|
11376
11625
|
index?: number;
|
11377
11626
|
expected?: string;
|
11378
11627
|
}
|
@@ -11383,7 +11632,7 @@ type ProblemType =
|
|
11383
11632
|
| "multiple-values-unexpected"
|
11384
11633
|
| "invalid-value";
|
11385
11634
|
declare interface ProcessAssetsAdditionalOptions {
|
11386
|
-
additionalAssets?:
|
11635
|
+
additionalAssets?: any;
|
11387
11636
|
}
|
11388
11637
|
declare class Profiler {
|
11389
11638
|
constructor(inspector?: any);
|
@@ -11391,7 +11640,7 @@ declare class Profiler {
|
|
11391
11640
|
inspector: any;
|
11392
11641
|
hasSession(): boolean;
|
11393
11642
|
startProfiling(): Promise<void> | Promise<[any, any, any]>;
|
11394
|
-
sendCommand(method: string, params
|
11643
|
+
sendCommand(method: string, params: Record<string, any>): Promise<any>;
|
11395
11644
|
destroy(): Promise<void>;
|
11396
11645
|
stopProfiling(): Promise<{ profile: any }>;
|
11397
11646
|
}
|
@@ -11594,7 +11843,10 @@ declare interface RawSourceMap {
|
|
11594
11843
|
mappings: string;
|
11595
11844
|
file: string;
|
11596
11845
|
}
|
11597
|
-
declare interface Read<
|
11846
|
+
declare interface Read<
|
11847
|
+
TBuffer extends
|
11848
|
+
ArrayBufferView<ArrayBufferLike> = ArrayBufferView<ArrayBufferLike>
|
11849
|
+
> {
|
11598
11850
|
(
|
11599
11851
|
fd: number,
|
11600
11852
|
buffer: TBuffer,
|
@@ -11621,11 +11873,13 @@ declare interface Read<TBuffer extends ArrayBufferView = Buffer> {
|
|
11621
11873
|
callback: (
|
11622
11874
|
err: null | NodeJS.ErrnoException,
|
11623
11875
|
bytesRead: number,
|
11624
|
-
buffer: ArrayBufferView
|
11876
|
+
buffer: ArrayBufferView<ArrayBufferLike>
|
11625
11877
|
) => void
|
11626
11878
|
): void;
|
11627
11879
|
}
|
11628
|
-
declare interface ReadAsyncOptions<
|
11880
|
+
declare interface ReadAsyncOptions<
|
11881
|
+
TBuffer extends ArrayBufferView<ArrayBufferLike>
|
11882
|
+
> {
|
11629
11883
|
offset?: number;
|
11630
11884
|
length?: number;
|
11631
11885
|
position?: null | number | bigint;
|
@@ -11672,11 +11926,12 @@ declare interface ReadFileFs {
|
|
11672
11926
|
| undefined
|
11673
11927
|
| null
|
11674
11928
|
| ({ encoding?: null; flag?: string } & Abortable),
|
11675
|
-
callback: (
|
11929
|
+
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
11676
11930
|
): void;
|
11677
11931
|
(
|
11678
11932
|
path: PathOrFileDescriptorFs,
|
11679
11933
|
options:
|
11934
|
+
| ({ encoding: BufferEncoding; flag?: string } & Abortable)
|
11680
11935
|
| "ascii"
|
11681
11936
|
| "utf8"
|
11682
11937
|
| "utf-8"
|
@@ -11684,13 +11939,12 @@ declare interface ReadFileFs {
|
|
11684
11939
|
| "utf-16le"
|
11685
11940
|
| "ucs2"
|
11686
11941
|
| "ucs-2"
|
11687
|
-
| "latin1"
|
11688
|
-
| "binary"
|
11689
|
-
| ({ encoding: BufferEncoding; flag?: string } & Abortable)
|
11690
11942
|
| "base64"
|
11691
11943
|
| "base64url"
|
11944
|
+
| "latin1"
|
11945
|
+
| "binary"
|
11692
11946
|
| "hex",
|
11693
|
-
callback: (
|
11947
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
11694
11948
|
): void;
|
11695
11949
|
(
|
11696
11950
|
path: PathOrFileDescriptorFs,
|
@@ -11704,20 +11958,20 @@ declare interface ReadFileFs {
|
|
11704
11958
|
| "utf-16le"
|
11705
11959
|
| "ucs2"
|
11706
11960
|
| "ucs-2"
|
11707
|
-
| "latin1"
|
11708
|
-
| "binary"
|
11709
11961
|
| "base64"
|
11710
11962
|
| "base64url"
|
11963
|
+
| "latin1"
|
11964
|
+
| "binary"
|
11711
11965
|
| "hex"
|
11712
11966
|
| (ObjectEncodingOptions & { flag?: string } & Abortable),
|
11713
11967
|
callback: (
|
11714
|
-
|
11715
|
-
|
11968
|
+
err: null | NodeJS.ErrnoException,
|
11969
|
+
result?: string | Buffer
|
11716
11970
|
) => void
|
11717
11971
|
): void;
|
11718
11972
|
(
|
11719
11973
|
path: PathOrFileDescriptorFs,
|
11720
|
-
callback: (
|
11974
|
+
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
11721
11975
|
): void;
|
11722
11976
|
}
|
11723
11977
|
declare interface ReadFileSync {
|
@@ -11735,10 +11989,10 @@ declare interface ReadFileSync {
|
|
11735
11989
|
| "utf-16le"
|
11736
11990
|
| "ucs2"
|
11737
11991
|
| "ucs-2"
|
11738
|
-
| "latin1"
|
11739
|
-
| "binary"
|
11740
11992
|
| "base64"
|
11741
11993
|
| "base64url"
|
11994
|
+
| "latin1"
|
11995
|
+
| "binary"
|
11742
11996
|
| "hex"
|
11743
11997
|
| { encoding: BufferEncoding; flag?: string }
|
11744
11998
|
): string;
|
@@ -11753,10 +12007,10 @@ declare interface ReadFileSync {
|
|
11753
12007
|
| "utf-16le"
|
11754
12008
|
| "ucs2"
|
11755
12009
|
| "ucs-2"
|
11756
|
-
| "latin1"
|
11757
|
-
| "binary"
|
11758
12010
|
| "base64"
|
11759
12011
|
| "base64url"
|
12012
|
+
| "latin1"
|
12013
|
+
| "binary"
|
11760
12014
|
| "hex"
|
11761
12015
|
| (ObjectEncodingOptions & { flag?: string })
|
11762
12016
|
): string | Buffer;
|
@@ -11780,10 +12034,10 @@ declare interface ReadFileTypes {
|
|
11780
12034
|
| "utf-16le"
|
11781
12035
|
| "ucs2"
|
11782
12036
|
| "ucs-2"
|
11783
|
-
| "latin1"
|
11784
|
-
| "binary"
|
11785
12037
|
| "base64"
|
11786
12038
|
| "base64url"
|
12039
|
+
| "latin1"
|
12040
|
+
| "binary"
|
11787
12041
|
| "hex"
|
11788
12042
|
| ({ encoding: BufferEncoding; flag?: string } & Abortable),
|
11789
12043
|
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
@@ -11800,10 +12054,10 @@ declare interface ReadFileTypes {
|
|
11800
12054
|
| "utf-16le"
|
11801
12055
|
| "ucs2"
|
11802
12056
|
| "ucs-2"
|
11803
|
-
| "latin1"
|
11804
|
-
| "binary"
|
11805
12057
|
| "base64"
|
11806
12058
|
| "base64url"
|
12059
|
+
| "latin1"
|
12060
|
+
| "binary"
|
11807
12061
|
| "hex"
|
11808
12062
|
| (ObjectEncodingOptions & { flag?: string } & Abortable),
|
11809
12063
|
callback: (
|
@@ -11829,10 +12083,10 @@ declare interface ReaddirFs {
|
|
11829
12083
|
| "utf-16le"
|
11830
12084
|
| "ucs2"
|
11831
12085
|
| "ucs-2"
|
11832
|
-
| "latin1"
|
11833
|
-
| "binary"
|
11834
12086
|
| "base64"
|
11835
12087
|
| "base64url"
|
12088
|
+
| "latin1"
|
12089
|
+
| "binary"
|
11836
12090
|
| "hex"
|
11837
12091
|
| {
|
11838
12092
|
encoding:
|
@@ -11844,26 +12098,26 @@ declare interface ReaddirFs {
|
|
11844
12098
|
| "utf-16le"
|
11845
12099
|
| "ucs2"
|
11846
12100
|
| "ucs-2"
|
11847
|
-
| "latin1"
|
11848
|
-
| "binary"
|
11849
12101
|
| "base64"
|
11850
12102
|
| "base64url"
|
12103
|
+
| "latin1"
|
12104
|
+
| "binary"
|
11851
12105
|
| "hex";
|
11852
12106
|
withFileTypes?: false;
|
11853
12107
|
recursive?: boolean;
|
11854
12108
|
},
|
11855
|
-
callback: (
|
12109
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string[]) => void
|
11856
12110
|
): void;
|
11857
12111
|
(
|
11858
12112
|
path: PathLikeFs,
|
11859
12113
|
options:
|
11860
12114
|
| "buffer"
|
11861
12115
|
| { encoding: "buffer"; withFileTypes?: false; recursive?: boolean },
|
11862
|
-
callback: (
|
12116
|
+
callback: (err: null | NodeJS.ErrnoException, result?: Buffer[]) => void
|
11863
12117
|
): void;
|
11864
12118
|
(
|
11865
12119
|
path: PathLikeFs,
|
11866
|
-
callback: (
|
12120
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string[]) => void
|
11867
12121
|
): void;
|
11868
12122
|
(
|
11869
12123
|
path: PathLikeFs,
|
@@ -11877,18 +12131,18 @@ declare interface ReaddirFs {
|
|
11877
12131
|
| "utf-16le"
|
11878
12132
|
| "ucs2"
|
11879
12133
|
| "ucs-2"
|
11880
|
-
| "latin1"
|
11881
|
-
| "binary"
|
11882
12134
|
| "base64"
|
11883
12135
|
| "base64url"
|
12136
|
+
| "latin1"
|
12137
|
+
| "binary"
|
11884
12138
|
| "hex"
|
11885
12139
|
| (ObjectEncodingOptions & {
|
11886
12140
|
withFileTypes?: false;
|
11887
12141
|
recursive?: boolean;
|
11888
12142
|
}),
|
11889
12143
|
callback: (
|
11890
|
-
|
11891
|
-
|
12144
|
+
err: null | NodeJS.ErrnoException,
|
12145
|
+
result?: string[] | Buffer[]
|
11892
12146
|
) => void
|
11893
12147
|
): void;
|
11894
12148
|
(
|
@@ -11897,7 +12151,7 @@ declare interface ReaddirFs {
|
|
11897
12151
|
withFileTypes: true;
|
11898
12152
|
recursive?: boolean;
|
11899
12153
|
},
|
11900
|
-
callback: (
|
12154
|
+
callback: (err: null | NodeJS.ErrnoException, result?: Dirent[]) => void
|
11901
12155
|
): void;
|
11902
12156
|
}
|
11903
12157
|
declare interface ReaddirSync {
|
@@ -11912,10 +12166,10 @@ declare interface ReaddirSync {
|
|
11912
12166
|
| "utf-16le"
|
11913
12167
|
| "ucs2"
|
11914
12168
|
| "ucs-2"
|
11915
|
-
| "latin1"
|
11916
|
-
| "binary"
|
11917
12169
|
| "base64"
|
11918
12170
|
| "base64url"
|
12171
|
+
| "latin1"
|
12172
|
+
| "binary"
|
11919
12173
|
| "hex"
|
11920
12174
|
| {
|
11921
12175
|
encoding:
|
@@ -11927,10 +12181,10 @@ declare interface ReaddirSync {
|
|
11927
12181
|
| "utf-16le"
|
11928
12182
|
| "ucs2"
|
11929
12183
|
| "ucs-2"
|
11930
|
-
| "latin1"
|
11931
|
-
| "binary"
|
11932
12184
|
| "base64"
|
11933
12185
|
| "base64url"
|
12186
|
+
| "latin1"
|
12187
|
+
| "binary"
|
11934
12188
|
| "hex";
|
11935
12189
|
withFileTypes?: false;
|
11936
12190
|
recursive?: boolean;
|
@@ -11953,10 +12207,10 @@ declare interface ReaddirSync {
|
|
11953
12207
|
| "utf-16le"
|
11954
12208
|
| "ucs2"
|
11955
12209
|
| "ucs-2"
|
11956
|
-
| "latin1"
|
11957
|
-
| "binary"
|
11958
12210
|
| "base64"
|
11959
12211
|
| "base64url"
|
12212
|
+
| "latin1"
|
12213
|
+
| "binary"
|
11960
12214
|
| "hex"
|
11961
12215
|
| (ObjectEncodingOptions & { withFileTypes?: false; recursive?: boolean })
|
11962
12216
|
): string[] | Buffer[];
|
@@ -11981,10 +12235,10 @@ declare interface ReaddirTypes {
|
|
11981
12235
|
| "utf-16le"
|
11982
12236
|
| "ucs2"
|
11983
12237
|
| "ucs-2"
|
11984
|
-
| "latin1"
|
11985
|
-
| "binary"
|
11986
12238
|
| "base64"
|
11987
12239
|
| "base64url"
|
12240
|
+
| "latin1"
|
12241
|
+
| "binary"
|
11988
12242
|
| "hex"
|
11989
12243
|
| {
|
11990
12244
|
encoding:
|
@@ -11996,10 +12250,10 @@ declare interface ReaddirTypes {
|
|
11996
12250
|
| "utf-16le"
|
11997
12251
|
| "ucs2"
|
11998
12252
|
| "ucs-2"
|
11999
|
-
| "latin1"
|
12000
|
-
| "binary"
|
12001
12253
|
| "base64"
|
12002
12254
|
| "base64url"
|
12255
|
+
| "latin1"
|
12256
|
+
| "binary"
|
12003
12257
|
| "hex";
|
12004
12258
|
withFileTypes?: false;
|
12005
12259
|
recursive?: boolean;
|
@@ -12029,10 +12283,10 @@ declare interface ReaddirTypes {
|
|
12029
12283
|
| "utf-16le"
|
12030
12284
|
| "ucs2"
|
12031
12285
|
| "ucs-2"
|
12032
|
-
| "latin1"
|
12033
|
-
| "binary"
|
12034
12286
|
| "base64"
|
12035
12287
|
| "base64url"
|
12288
|
+
| "latin1"
|
12289
|
+
| "binary"
|
12036
12290
|
| "hex"
|
12037
12291
|
| (ObjectEncodingOptions & {
|
12038
12292
|
withFileTypes?: false;
|
@@ -12056,24 +12310,24 @@ declare interface ReadlinkFs {
|
|
12056
12310
|
(
|
12057
12311
|
path: PathLikeFs,
|
12058
12312
|
options: EncodingOption,
|
12059
|
-
callback: (
|
12313
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
12060
12314
|
): void;
|
12061
12315
|
(
|
12062
12316
|
path: PathLikeFs,
|
12063
12317
|
options: BufferEncodingOption,
|
12064
|
-
callback: (
|
12318
|
+
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
12065
12319
|
): void;
|
12066
12320
|
(
|
12067
12321
|
path: PathLikeFs,
|
12068
12322
|
options: EncodingOption,
|
12069
12323
|
callback: (
|
12070
|
-
|
12071
|
-
|
12324
|
+
err: null | NodeJS.ErrnoException,
|
12325
|
+
result?: string | Buffer
|
12072
12326
|
) => void
|
12073
12327
|
): void;
|
12074
12328
|
(
|
12075
12329
|
path: PathLikeFs,
|
12076
|
-
callback: (
|
12330
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
12077
12331
|
): void;
|
12078
12332
|
}
|
12079
12333
|
declare interface ReadlinkSync {
|
@@ -12106,16 +12360,7 @@ declare interface ReadlinkTypes {
|
|
12106
12360
|
): void;
|
12107
12361
|
}
|
12108
12362
|
declare class RealContentHashPlugin {
|
12109
|
-
constructor(__0:
|
12110
|
-
/**
|
12111
|
-
* the hash function to use
|
12112
|
-
*/
|
12113
|
-
hashFunction: string | typeof Hash;
|
12114
|
-
/**
|
12115
|
-
* the hash digest to use
|
12116
|
-
*/
|
12117
|
-
hashDigest: string;
|
12118
|
-
});
|
12363
|
+
constructor(__0: RealContentHashPluginOptions);
|
12119
12364
|
|
12120
12365
|
/**
|
12121
12366
|
* Apply the plugin
|
@@ -12125,6 +12370,17 @@ declare class RealContentHashPlugin {
|
|
12125
12370
|
compilation: Compilation
|
12126
12371
|
): CompilationHooksRealContentHashPlugin;
|
12127
12372
|
}
|
12373
|
+
declare interface RealContentHashPluginOptions {
|
12374
|
+
/**
|
12375
|
+
* the hash function to use
|
12376
|
+
*/
|
12377
|
+
hashFunction: string | typeof Hash;
|
12378
|
+
|
12379
|
+
/**
|
12380
|
+
* the hash digest to use
|
12381
|
+
*/
|
12382
|
+
hashDigest?: string;
|
12383
|
+
}
|
12128
12384
|
declare interface RealDependencyLocation {
|
12129
12385
|
start: SourcePosition;
|
12130
12386
|
end?: SourcePosition;
|
@@ -12134,24 +12390,24 @@ declare interface RealPathFs {
|
|
12134
12390
|
(
|
12135
12391
|
path: PathLikeFs,
|
12136
12392
|
options: EncodingOption,
|
12137
|
-
callback: (
|
12393
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
12138
12394
|
): void;
|
12139
12395
|
(
|
12140
12396
|
path: PathLikeFs,
|
12141
12397
|
options: BufferEncodingOption,
|
12142
|
-
callback: (
|
12398
|
+
callback: (err: null | NodeJS.ErrnoException, result?: Buffer) => void
|
12143
12399
|
): void;
|
12144
12400
|
(
|
12145
12401
|
path: PathLikeFs,
|
12146
12402
|
options: EncodingOption,
|
12147
12403
|
callback: (
|
12148
|
-
|
12149
|
-
|
12404
|
+
err: null | NodeJS.ErrnoException,
|
12405
|
+
result?: string | Buffer
|
12150
12406
|
) => void
|
12151
12407
|
): void;
|
12152
12408
|
(
|
12153
12409
|
path: PathLikeFs,
|
12154
|
-
callback: (
|
12410
|
+
callback: (err: null | NodeJS.ErrnoException, result?: string) => void
|
12155
12411
|
): void;
|
12156
12412
|
}
|
12157
12413
|
declare interface RealPathSync {
|
@@ -12183,6 +12439,9 @@ declare interface RealPathTypes {
|
|
12183
12439
|
callback: (arg0: null | NodeJS.ErrnoException, arg1?: string) => void
|
12184
12440
|
): void;
|
12185
12441
|
}
|
12442
|
+
declare interface Records {
|
12443
|
+
[index: string]: any;
|
12444
|
+
}
|
12186
12445
|
type RecursiveArrayOrRecord<T> =
|
12187
12446
|
| { [index: string]: RecursiveArrayOrRecord<T> }
|
12188
12447
|
| RecursiveArrayOrRecord<T>[]
|
@@ -12377,7 +12636,7 @@ declare interface RequestRecord {
|
|
12377
12636
|
[index: string]: string | string[];
|
12378
12637
|
}
|
12379
12638
|
declare abstract class RequestShortener {
|
12380
|
-
contextify: (
|
12639
|
+
contextify: (value: string) => string;
|
12381
12640
|
shorten(request?: null | string): undefined | null | string;
|
12382
12641
|
}
|
12383
12642
|
declare interface ResolveBuildDependenciesResult {
|
@@ -12404,20 +12663,7 @@ declare interface ResolveBuildDependenciesResult {
|
|
12404
12663
|
/**
|
12405
12664
|
* dependencies of the resolving
|
12406
12665
|
*/
|
12407
|
-
resolveDependencies:
|
12408
|
-
/**
|
12409
|
-
* list of files
|
12410
|
-
*/
|
12411
|
-
files: Set<string>;
|
12412
|
-
/**
|
12413
|
-
* list of directories
|
12414
|
-
*/
|
12415
|
-
directories: Set<string>;
|
12416
|
-
/**
|
12417
|
-
* list of missing entries
|
12418
|
-
*/
|
12419
|
-
missing: Set<string>;
|
12420
|
-
};
|
12666
|
+
resolveDependencies: ResolveDependencies;
|
12421
12667
|
}
|
12422
12668
|
declare interface ResolveContext {
|
12423
12669
|
contextDependencies?: WriteOnlySet<string>;
|
@@ -12452,7 +12698,7 @@ declare interface ResolveData {
|
|
12452
12698
|
resolveOptions?: ResolveOptions;
|
12453
12699
|
context: string;
|
12454
12700
|
request: string;
|
12455
|
-
assertions?:
|
12701
|
+
assertions?: ImportAttributes;
|
12456
12702
|
dependencies: ModuleDependency[];
|
12457
12703
|
dependencyType: string;
|
12458
12704
|
createData: Partial<NormalModuleCreateData & { settings: ModuleSettings }>;
|
@@ -12466,6 +12712,22 @@ declare interface ResolveData {
|
|
12466
12712
|
*/
|
12467
12713
|
cacheable: boolean;
|
12468
12714
|
}
|
12715
|
+
declare interface ResolveDependencies {
|
12716
|
+
/**
|
12717
|
+
* list of files
|
12718
|
+
*/
|
12719
|
+
files: Set<string>;
|
12720
|
+
|
12721
|
+
/**
|
12722
|
+
* list of directories
|
12723
|
+
*/
|
12724
|
+
directories: Set<string>;
|
12725
|
+
|
12726
|
+
/**
|
12727
|
+
* list of missing entries
|
12728
|
+
*/
|
12729
|
+
missing: Set<string>;
|
12730
|
+
}
|
12469
12731
|
|
12470
12732
|
/**
|
12471
12733
|
* Options object for resolving requests.
|
@@ -12919,7 +13181,7 @@ declare abstract class Resolver {
|
|
12919
13181
|
normalize(path: string): string;
|
12920
13182
|
}
|
12921
13183
|
declare interface ResolverCache {
|
12922
|
-
direct: WeakMap<
|
13184
|
+
direct: WeakMap<ResolveOptionsWithDependencyType, ResolverWithOptions>;
|
12923
13185
|
stringified: Map<string, ResolverWithOptions>;
|
12924
13186
|
}
|
12925
13187
|
declare abstract class ResolverFactory {
|
@@ -12954,10 +13216,10 @@ declare interface ResourceDataWithData {
|
|
12954
13216
|
data: Record<string, any>;
|
12955
13217
|
}
|
12956
13218
|
declare abstract class RestoreProvidedData {
|
12957
|
-
exports: any;
|
12958
|
-
otherProvided
|
12959
|
-
otherCanMangleProvide
|
12960
|
-
otherTerminalBinding:
|
13219
|
+
exports: any[];
|
13220
|
+
otherProvided?: null | boolean;
|
13221
|
+
otherCanMangleProvide?: boolean;
|
13222
|
+
otherTerminalBinding: boolean;
|
12961
13223
|
serialize(__0: ObjectSerializerContext): void;
|
12962
13224
|
}
|
12963
13225
|
declare interface RmDirOptions {
|
@@ -12968,12 +13230,12 @@ declare interface RmDirOptions {
|
|
12968
13230
|
declare interface Rmdir {
|
12969
13231
|
(
|
12970
13232
|
file: PathLikeFs,
|
12971
|
-
callback: (
|
13233
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
12972
13234
|
): void;
|
12973
13235
|
(
|
12974
13236
|
file: PathLikeFs,
|
12975
13237
|
options: RmDirOptions,
|
12976
|
-
callback: (
|
13238
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
12977
13239
|
): void;
|
12978
13240
|
}
|
12979
13241
|
type Rule = string | RegExp;
|
@@ -12981,12 +13243,12 @@ declare interface RuleSet {
|
|
12981
13243
|
/**
|
12982
13244
|
* map of references in the rule set (may grow over time)
|
12983
13245
|
*/
|
12984
|
-
references: Map<string,
|
13246
|
+
references: Map<string, RuleSetLoaderOptions>;
|
12985
13247
|
|
12986
13248
|
/**
|
12987
13249
|
* execute the rule set
|
12988
13250
|
*/
|
12989
|
-
exec: (
|
13251
|
+
exec: (effectData: EffectData) => Effect[];
|
12990
13252
|
}
|
12991
13253
|
type RuleSetCondition =
|
12992
13254
|
| string
|
@@ -13006,6 +13268,7 @@ type RuleSetConditionOrConditions =
|
|
13006
13268
|
| ((value: string) => boolean)
|
13007
13269
|
| RuleSetLogicalConditions
|
13008
13270
|
| RuleSetCondition[];
|
13271
|
+
type RuleSetLoaderOptions = string | { [index: string]: any };
|
13009
13272
|
|
13010
13273
|
/**
|
13011
13274
|
* Logic operators used in a condition matcher.
|
@@ -13471,16 +13734,16 @@ declare interface RuntimeRequirementsContext {
|
|
13471
13734
|
codeGenerationResults: CodeGenerationResults;
|
13472
13735
|
}
|
13473
13736
|
type RuntimeSpec = undefined | string | SortableSet<string>;
|
13474
|
-
declare class RuntimeSpecMap<T> {
|
13475
|
-
constructor(clone?: RuntimeSpecMap<T>);
|
13476
|
-
get(runtime: RuntimeSpec): undefined |
|
13737
|
+
declare class RuntimeSpecMap<T, R = T> {
|
13738
|
+
constructor(clone?: RuntimeSpecMap<T, R>);
|
13739
|
+
get(runtime: RuntimeSpec): undefined | R;
|
13477
13740
|
has(runtime: RuntimeSpec): boolean;
|
13478
|
-
set(runtime: RuntimeSpec, value:
|
13479
|
-
provide(runtime: RuntimeSpec, computer: () =>
|
13741
|
+
set(runtime: RuntimeSpec, value: R): void;
|
13742
|
+
provide(runtime: RuntimeSpec, computer: () => R): R;
|
13480
13743
|
delete(runtime: RuntimeSpec): void;
|
13481
|
-
update(runtime: RuntimeSpec, fn: (
|
13744
|
+
update(runtime: RuntimeSpec, fn: (value?: R) => R): void;
|
13482
13745
|
keys(): RuntimeSpec[];
|
13483
|
-
values(): IterableIterator<
|
13746
|
+
values(): IterableIterator<R>;
|
13484
13747
|
get size(): number;
|
13485
13748
|
}
|
13486
13749
|
declare class RuntimeSpecSet {
|
@@ -13771,7 +14034,7 @@ declare abstract class RuntimeTemplate {
|
|
13771
14034
|
*/
|
13772
14035
|
runtimeRequirements: Set<string>;
|
13773
14036
|
}): [string, string];
|
13774
|
-
exportFromImport(__0: {
|
14037
|
+
exportFromImport<GenerateContext>(__0: {
|
13775
14038
|
/**
|
13776
14039
|
* the module graph
|
13777
14040
|
*/
|
@@ -13815,7 +14078,7 @@ declare abstract class RuntimeTemplate {
|
|
13815
14078
|
/**
|
13816
14079
|
* init fragments will be added here
|
13817
14080
|
*/
|
13818
|
-
initFragments: InitFragment<
|
14081
|
+
initFragments: InitFragment<GenerateContext>[];
|
13819
14082
|
/**
|
13820
14083
|
* runtime for which this code will be generated
|
13821
14084
|
*/
|
@@ -13891,7 +14154,7 @@ declare abstract class RuntimeTemplate {
|
|
13891
14154
|
}): string;
|
13892
14155
|
}
|
13893
14156
|
declare abstract class RuntimeValue {
|
13894
|
-
fn: (
|
14157
|
+
fn: (value: {
|
13895
14158
|
module: NormalModule;
|
13896
14159
|
key: string;
|
13897
14160
|
readonly version: ValueCacheVersion;
|
@@ -13926,6 +14189,12 @@ declare interface ScopeInfo {
|
|
13926
14189
|
inTry: boolean;
|
13927
14190
|
isStrict: boolean;
|
13928
14191
|
isAsmJs: boolean;
|
14192
|
+
|
14193
|
+
/**
|
14194
|
+
* false for unknown state
|
14195
|
+
*/
|
14196
|
+
inExecutedPath: boolean;
|
14197
|
+
terminated?: "return" | "throw";
|
13929
14198
|
}
|
13930
14199
|
declare interface Selector<A, B> {
|
13931
14200
|
(input: A): undefined | null | B;
|
@@ -13940,17 +14209,13 @@ declare abstract class Serializer {
|
|
13940
14209
|
declare abstract class SerializerMiddleware<DeserializedType, SerializedType> {
|
13941
14210
|
serialize(
|
13942
14211
|
data: DeserializedType,
|
13943
|
-
context
|
13944
|
-
): SerializedType | Promise<SerializedType>;
|
14212
|
+
context?: any
|
14213
|
+
): null | SerializedType | Promise<SerializedType>;
|
13945
14214
|
deserialize(
|
13946
14215
|
data: SerializedType,
|
13947
|
-
context
|
14216
|
+
context?: any
|
13948
14217
|
): DeserializedType | Promise<DeserializedType>;
|
13949
14218
|
}
|
13950
|
-
type ServerOptionsHttps<
|
13951
|
-
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
13952
|
-
Response extends typeof ServerResponse = typeof ServerResponse
|
13953
|
-
> = SecureContextOptions & TlsOptions & ServerOptionsImport<Request, Response>;
|
13954
14219
|
declare class SharePlugin {
|
13955
14220
|
constructor(options: SharePluginOptions);
|
13956
14221
|
|
@@ -14189,7 +14454,7 @@ declare interface SnapshotOptionsWebpackOptions {
|
|
14189
14454
|
unmanagedPaths?: (string | RegExp)[];
|
14190
14455
|
}
|
14191
14456
|
declare interface SortFunction<T> {
|
14192
|
-
(
|
14457
|
+
(a: T, b: T): number;
|
14193
14458
|
}
|
14194
14459
|
declare abstract class SortableSet<T> extends Set<T> {
|
14195
14460
|
/**
|
@@ -14201,12 +14466,12 @@ declare abstract class SortableSet<T> extends Set<T> {
|
|
14201
14466
|
/**
|
14202
14467
|
* Get data from cache
|
14203
14468
|
*/
|
14204
|
-
getFromCache<R>(fn: (
|
14469
|
+
getFromCache<R extends unknown>(fn: (set: SortableSet<T>) => R): R;
|
14205
14470
|
|
14206
14471
|
/**
|
14207
14472
|
* Get data from cache (ignoring sorting)
|
14208
14473
|
*/
|
14209
|
-
getFromUnorderedCache<R>(fn: (
|
14474
|
+
getFromUnorderedCache<R>(fn: (set: SortableSet<T>) => R): R;
|
14210
14475
|
toJSON(): T[];
|
14211
14476
|
}
|
14212
14477
|
declare class Source {
|
@@ -14237,9 +14502,9 @@ declare class SourceMapDevToolPlugin {
|
|
14237
14502
|
sourceMappingURLComment:
|
14238
14503
|
| string
|
14239
14504
|
| false
|
14240
|
-
| ((
|
14241
|
-
moduleFilenameTemplate: string |
|
14242
|
-
fallbackModuleFilenameTemplate: string |
|
14505
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
14506
|
+
moduleFilenameTemplate: string | ((context?: any) => string);
|
14507
|
+
fallbackModuleFilenameTemplate: string | ((context?: any) => string);
|
14243
14508
|
namespace: string;
|
14244
14509
|
options: SourceMapDevToolPluginOptions;
|
14245
14510
|
|
@@ -14276,7 +14541,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
14276
14541
|
/**
|
14277
14542
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.
|
14278
14543
|
*/
|
14279
|
-
fallbackModuleFilenameTemplate?: string |
|
14544
|
+
fallbackModuleFilenameTemplate?: string | ((context?: any) => string);
|
14280
14545
|
|
14281
14546
|
/**
|
14282
14547
|
* Path prefix to which the [file] placeholder is relative to.
|
@@ -14301,7 +14566,7 @@ declare interface SourceMapDevToolPluginOptions {
|
|
14301
14566
|
/**
|
14302
14567
|
* Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.
|
14303
14568
|
*/
|
14304
|
-
moduleFilenameTemplate?: string |
|
14569
|
+
moduleFilenameTemplate?: string | ((context?: any) => string);
|
14305
14570
|
|
14306
14571
|
/**
|
14307
14572
|
* Namespace prefix to allow multiple webpack roots in the devtools.
|
@@ -14363,17 +14628,13 @@ declare interface SplitChunksOptions {
|
|
14363
14628
|
maxAsyncRequests: number;
|
14364
14629
|
maxInitialRequests: number;
|
14365
14630
|
hidePathInfo: boolean;
|
14366
|
-
filename:
|
14631
|
+
filename?: string | ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
14367
14632
|
automaticNameDelimiter: string;
|
14368
14633
|
getCacheGroups: (
|
14369
14634
|
module: Module,
|
14370
14635
|
context: CacheGroupsContext
|
14371
|
-
) => CacheGroupSource[];
|
14372
|
-
getName: (
|
14373
|
-
module?: Module,
|
14374
|
-
chunks?: Chunk[],
|
14375
|
-
key?: string
|
14376
|
-
) => undefined | string;
|
14636
|
+
) => null | CacheGroupSource[];
|
14637
|
+
getName: (module: Module, chunks: Chunk[], key: string) => undefined | string;
|
14377
14638
|
usedExports: boolean;
|
14378
14639
|
fallbackCacheGroup: FallbackCacheGroup;
|
14379
14640
|
}
|
@@ -14409,24 +14670,24 @@ type StartupRenderContext = RenderContextJavascriptModulesPlugin & {
|
|
14409
14670
|
declare interface StatFs {
|
14410
14671
|
(
|
14411
14672
|
path: PathLikeFs,
|
14412
|
-
callback: (
|
14673
|
+
callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
|
14413
14674
|
): void;
|
14414
14675
|
(
|
14415
14676
|
path: PathLikeFs,
|
14416
14677
|
options: undefined | (StatOptions & { bigint?: false }),
|
14417
|
-
callback: (
|
14678
|
+
callback: (err: null | NodeJS.ErrnoException, result?: IStats) => void
|
14418
14679
|
): void;
|
14419
14680
|
(
|
14420
14681
|
path: PathLikeFs,
|
14421
14682
|
options: StatOptions & { bigint: true },
|
14422
|
-
callback: (
|
14683
|
+
callback: (err: null | NodeJS.ErrnoException, result?: IBigIntStats) => void
|
14423
14684
|
): void;
|
14424
14685
|
(
|
14425
14686
|
path: PathLikeFs,
|
14426
14687
|
options: undefined | StatOptions,
|
14427
14688
|
callback: (
|
14428
|
-
|
14429
|
-
|
14689
|
+
err: null | NodeJS.ErrnoException,
|
14690
|
+
result?: IStats | IBigIntStats
|
14430
14691
|
) => void
|
14431
14692
|
): void;
|
14432
14693
|
}
|
@@ -14537,8 +14798,10 @@ type StatementPathItem =
|
|
14537
14798
|
| UpdateExpression
|
14538
14799
|
| YieldExpression
|
14539
14800
|
| FunctionDeclaration
|
14801
|
+
| MaybeNamedFunctionDeclaration
|
14540
14802
|
| VariableDeclaration
|
14541
14803
|
| ClassDeclaration
|
14804
|
+
| MaybeNamedClassDeclaration
|
14542
14805
|
| ExpressionStatement
|
14543
14806
|
| BlockStatement
|
14544
14807
|
| StaticBlock
|
@@ -14570,12 +14833,12 @@ declare class Stats {
|
|
14570
14833
|
toJson(options?: string | boolean | StatsOptions): StatsCompilation;
|
14571
14834
|
toString(options?: string | boolean | StatsOptions): string;
|
14572
14835
|
}
|
14573
|
-
type StatsAsset = Record<string, any
|
14574
|
-
type StatsChunk = Record<string, any
|
14575
|
-
type StatsChunkGroup = Record<string, any
|
14576
|
-
type StatsChunkOrigin = Record<string, any
|
14577
|
-
type StatsCompilation = Record<string, any
|
14578
|
-
type StatsError = Record<string, any
|
14836
|
+
type StatsAsset = KnownStatsAsset & Record<string, any>;
|
14837
|
+
type StatsChunk = KnownStatsChunk & Record<string, any>;
|
14838
|
+
type StatsChunkGroup = KnownStatsChunkGroup & Record<string, any>;
|
14839
|
+
type StatsChunkOrigin = KnownStatsChunkOrigin & Record<string, any>;
|
14840
|
+
type StatsCompilation = KnownStatsCompilation & Record<string, any>;
|
14841
|
+
type StatsError = KnownStatsError & Record<string, any>;
|
14579
14842
|
declare abstract class StatsFactory {
|
14580
14843
|
hooks: StatsFactoryHooks;
|
14581
14844
|
create(
|
@@ -14584,7 +14847,7 @@ declare abstract class StatsFactory {
|
|
14584
14847
|
baseContext: Omit<StatsFactoryContext, "type">
|
14585
14848
|
): any;
|
14586
14849
|
}
|
14587
|
-
type StatsFactoryContext = Record<string, any
|
14850
|
+
type StatsFactoryContext = KnownStatsFactoryContext & Record<string, any>;
|
14588
14851
|
declare interface StatsFactoryHooks {
|
14589
14852
|
extract: HookMap<
|
14590
14853
|
SyncBailHook<[ObjectForExtract, any, StatsFactoryContext], void>
|
@@ -14594,7 +14857,7 @@ declare interface StatsFactoryHooks {
|
|
14594
14857
|
>;
|
14595
14858
|
sort: HookMap<
|
14596
14859
|
SyncBailHook<
|
14597
|
-
[((
|
14860
|
+
[((a?: any, b?: any) => 0 | 1 | -1)[], StatsFactoryContext],
|
14598
14861
|
void
|
14599
14862
|
>
|
14600
14863
|
>;
|
@@ -14606,7 +14869,7 @@ declare interface StatsFactoryHooks {
|
|
14606
14869
|
>;
|
14607
14870
|
sortResults: HookMap<
|
14608
14871
|
SyncBailHook<
|
14609
|
-
[((
|
14872
|
+
[((a?: any, b?: any) => 0 | 1 | -1)[], StatsFactoryContext],
|
14610
14873
|
void
|
14611
14874
|
>
|
14612
14875
|
>;
|
@@ -14620,14 +14883,14 @@ declare interface StatsFactoryHooks {
|
|
14620
14883
|
SyncBailHook<[any, StatsFactoryContext], void | StatsFactory>
|
14621
14884
|
>;
|
14622
14885
|
}
|
14623
|
-
type StatsLogging = Record<string, any
|
14624
|
-
type StatsLoggingEntry = Record<string, any
|
14625
|
-
type StatsModule = Record<string, any
|
14626
|
-
type StatsModuleIssuer = Record<string, any
|
14627
|
-
type StatsModuleReason = Record<string, any
|
14628
|
-
type StatsModuleTraceDependency =
|
14629
|
-
|
14630
|
-
type StatsModuleTraceItem = Record<string, any
|
14886
|
+
type StatsLogging = KnownStatsLogging & Record<string, any>;
|
14887
|
+
type StatsLoggingEntry = KnownStatsLoggingEntry & Record<string, any>;
|
14888
|
+
type StatsModule = KnownStatsModule & Record<string, any>;
|
14889
|
+
type StatsModuleIssuer = KnownStatsModuleIssuer & Record<string, any>;
|
14890
|
+
type StatsModuleReason = KnownStatsModuleReason & Record<string, any>;
|
14891
|
+
type StatsModuleTraceDependency = KnownStatsModuleTraceDependency &
|
14892
|
+
Record<string, any>;
|
14893
|
+
type StatsModuleTraceItem = KnownStatsModuleTraceItem & Record<string, any>;
|
14631
14894
|
|
14632
14895
|
/**
|
14633
14896
|
* Stats options object.
|
@@ -14646,7 +14909,7 @@ declare interface StatsOptions {
|
|
14646
14909
|
/**
|
14647
14910
|
* Sort the assets by that field.
|
14648
14911
|
*/
|
14649
|
-
assetsSort?: string;
|
14912
|
+
assetsSort?: string | false;
|
14650
14913
|
|
14651
14914
|
/**
|
14652
14915
|
* Space to display assets (groups will be collapsed to fit this space).
|
@@ -14726,7 +14989,7 @@ declare interface StatsOptions {
|
|
14726
14989
|
/**
|
14727
14990
|
* Sort the chunks by that field.
|
14728
14991
|
*/
|
14729
|
-
chunksSort?: string;
|
14992
|
+
chunksSort?: string | false;
|
14730
14993
|
|
14731
14994
|
/**
|
14732
14995
|
* Enables/Disables colorful output.
|
@@ -14955,7 +15218,7 @@ declare interface StatsOptions {
|
|
14955
15218
|
/**
|
14956
15219
|
* Sort the modules by that field.
|
14957
15220
|
*/
|
14958
|
-
modulesSort?: string;
|
15221
|
+
modulesSort?: string | false;
|
14959
15222
|
|
14960
15223
|
/**
|
14961
15224
|
* Space to display modules (groups will be collapsed to fit this space, value is in number of modules/groups).
|
@@ -15095,11 +15358,11 @@ declare abstract class StatsPrinter {
|
|
15095
15358
|
hooks: StatsPrintHooks;
|
15096
15359
|
print(type: string, object?: any, baseContext?: StatsPrinterContext): string;
|
15097
15360
|
}
|
15098
|
-
type StatsPrinterContext =
|
15099
|
-
|
15100
|
-
|
15101
|
-
|
15102
|
-
type StatsProfile = Record<string, any
|
15361
|
+
type StatsPrinterContext = KnownStatsPrinterColorFn &
|
15362
|
+
KnownStatsPrinterFormatters &
|
15363
|
+
KnownStatsPrinterContext &
|
15364
|
+
Record<string, any>;
|
15365
|
+
type StatsProfile = KnownStatsProfile & Record<string, any>;
|
15103
15366
|
type StatsValue =
|
15104
15367
|
| boolean
|
15105
15368
|
| StatsOptions
|
@@ -15113,30 +15376,34 @@ type StatsValue =
|
|
15113
15376
|
| "detailed";
|
15114
15377
|
type Supports = undefined | string;
|
15115
15378
|
declare class SyncModuleIdsPlugin {
|
15116
|
-
constructor(__0:
|
15117
|
-
/**
|
15118
|
-
* path to file
|
15119
|
-
*/
|
15120
|
-
path: string;
|
15121
|
-
/**
|
15122
|
-
* context for module names
|
15123
|
-
*/
|
15124
|
-
context?: string;
|
15125
|
-
/**
|
15126
|
-
* selector for modules
|
15127
|
-
*/
|
15128
|
-
test: (arg0: Module) => boolean;
|
15129
|
-
/**
|
15130
|
-
* operation mode (defaults to merge)
|
15131
|
-
*/
|
15132
|
-
mode?: "read" | "create" | "merge" | "update";
|
15133
|
-
});
|
15379
|
+
constructor(__0: SyncModuleIdsPluginOptions);
|
15134
15380
|
|
15135
15381
|
/**
|
15136
15382
|
* Apply the plugin
|
15137
15383
|
*/
|
15138
15384
|
apply(compiler: Compiler): void;
|
15139
15385
|
}
|
15386
|
+
declare interface SyncModuleIdsPluginOptions {
|
15387
|
+
/**
|
15388
|
+
* path to file
|
15389
|
+
*/
|
15390
|
+
path: string;
|
15391
|
+
|
15392
|
+
/**
|
15393
|
+
* context for module names
|
15394
|
+
*/
|
15395
|
+
context?: string;
|
15396
|
+
|
15397
|
+
/**
|
15398
|
+
* selector for modules
|
15399
|
+
*/
|
15400
|
+
test?: (module: Module) => boolean;
|
15401
|
+
|
15402
|
+
/**
|
15403
|
+
* operation mode (defaults to merge)
|
15404
|
+
*/
|
15405
|
+
mode?: "read" | "create" | "merge" | "update";
|
15406
|
+
}
|
15140
15407
|
declare interface SyntheticDependencyLocation {
|
15141
15408
|
name: string;
|
15142
15409
|
index?: number;
|
@@ -15144,6 +15411,9 @@ declare interface SyntheticDependencyLocation {
|
|
15144
15411
|
declare const TOMBSTONE: unique symbol;
|
15145
15412
|
declare const TRANSITIVE: unique symbol;
|
15146
15413
|
declare const TRANSITIVE_ONLY: unique symbol;
|
15414
|
+
declare interface TagData {
|
15415
|
+
[index: string]: any;
|
15416
|
+
}
|
15147
15417
|
|
15148
15418
|
/**
|
15149
15419
|
* Helper function for joining two ranges into a single range. This is useful
|
@@ -15151,11 +15421,11 @@ declare const TRANSITIVE_ONLY: unique symbol;
|
|
15151
15421
|
* to create the range of the _parent node_.
|
15152
15422
|
*/
|
15153
15423
|
declare interface TagInfo {
|
15154
|
-
tag:
|
15155
|
-
data
|
15424
|
+
tag: symbol;
|
15425
|
+
data?: TagData;
|
15156
15426
|
next?: TagInfo;
|
15157
15427
|
}
|
15158
|
-
declare interface
|
15428
|
+
declare interface TargetItemWithConnection {
|
15159
15429
|
module: Module;
|
15160
15430
|
connection: ModuleGraphConnection;
|
15161
15431
|
export?: string[];
|
@@ -15166,7 +15436,7 @@ declare interface TargetItemWithoutConnection {
|
|
15166
15436
|
}
|
15167
15437
|
declare class Template {
|
15168
15438
|
constructor();
|
15169
|
-
static getFunctionContent(fn:
|
15439
|
+
static getFunctionContent<T extends Function>(fn: T): string;
|
15170
15440
|
static toIdentifier(str: string): string;
|
15171
15441
|
static toComment(str: string): string;
|
15172
15442
|
static toNormalComment(str: string): string;
|
@@ -15180,7 +15450,7 @@ declare class Template {
|
|
15180
15450
|
static renderChunkModules(
|
15181
15451
|
renderContext: ChunkRenderContextJavascriptModulesPlugin,
|
15182
15452
|
modules: Module[],
|
15183
|
-
renderModule: (
|
15453
|
+
renderModule: (module: Module) => null | Source,
|
15184
15454
|
prefix?: string
|
15185
15455
|
): null | Source;
|
15186
15456
|
static renderRuntimeModules(
|
@@ -15196,7 +15466,9 @@ declare class Template {
|
|
15196
15466
|
static NUMBER_OF_IDENTIFIER_START_CHARS: number;
|
15197
15467
|
static NUMBER_OF_IDENTIFIER_CONTINUATION_CHARS: number;
|
15198
15468
|
}
|
15199
|
-
type TemplatePath =
|
15469
|
+
type TemplatePath =
|
15470
|
+
| string
|
15471
|
+
| ((pathData: PathData, assetInfo?: AssetInfo) => string);
|
15200
15472
|
declare interface TimestampAndHash {
|
15201
15473
|
safeTime: number;
|
15202
15474
|
timestamp?: number;
|
@@ -15228,10 +15500,7 @@ declare const UNDEFINED_MARKER: unique symbol;
|
|
15228
15500
|
* https://nodejs.org/api/url.html#the-whatwg-url-api
|
15229
15501
|
*/
|
15230
15502
|
declare interface URL_url extends URL {}
|
15231
|
-
|
15232
|
-
factoryMeta?: FactoryMeta;
|
15233
|
-
resolveOptions?: ResolveOptions;
|
15234
|
-
}
|
15503
|
+
type UnsafeCacheData = KnownUnsafeCacheData & Record<string, any>;
|
15235
15504
|
declare interface UpdateHashContextDependency {
|
15236
15505
|
chunkGraph: ChunkGraph;
|
15237
15506
|
runtime: RuntimeSpec;
|
@@ -15260,11 +15529,6 @@ declare class VariableInfo {
|
|
15260
15529
|
freeName?: string | true;
|
15261
15530
|
tagInfo?: TagInfo;
|
15262
15531
|
}
|
15263
|
-
declare interface VariableInfoInterface {
|
15264
|
-
declaredScope: ScopeInfo;
|
15265
|
-
freeName?: string | true;
|
15266
|
-
tagInfo?: TagInfo;
|
15267
|
-
}
|
15268
15532
|
type WarningFilterItemTypes =
|
15269
15533
|
| string
|
15270
15534
|
| RegExp
|
@@ -15277,13 +15541,13 @@ declare interface WatchFileSystem {
|
|
15277
15541
|
startTime: number,
|
15278
15542
|
options: WatchOptions,
|
15279
15543
|
callback: (
|
15280
|
-
|
15281
|
-
|
15282
|
-
|
15283
|
-
|
15284
|
-
|
15544
|
+
err: null | Error,
|
15545
|
+
timeInfoEntries1?: Map<string, FileSystemInfoEntry | "ignore">,
|
15546
|
+
timeInfoEntries2?: Map<string, FileSystemInfoEntry | "ignore">,
|
15547
|
+
changes?: Set<string>,
|
15548
|
+
removals?: Set<string>
|
15285
15549
|
) => void,
|
15286
|
-
callbackUndelayed: (
|
15550
|
+
callbackUndelayed: (value: string, num: number) => void
|
15287
15551
|
) => Watcher;
|
15288
15552
|
}
|
15289
15553
|
declare class WatchIgnorePlugin {
|
@@ -15464,6 +15728,7 @@ declare class WebpackError extends Error {
|
|
15464
15728
|
* Creates an instance of WebpackError.
|
15465
15729
|
*/
|
15466
15730
|
constructor(message?: string);
|
15731
|
+
[index: number]: () => string;
|
15467
15732
|
details?: string;
|
15468
15733
|
module?: null | Module;
|
15469
15734
|
loc?: SyntheticDependencyLocation | RealDependencyLocation;
|
@@ -15491,7 +15756,7 @@ declare class WebpackError extends Error {
|
|
15491
15756
|
static stackTraceLimit: number;
|
15492
15757
|
}
|
15493
15758
|
declare abstract class WebpackLogger {
|
15494
|
-
getChildLogger: (
|
15759
|
+
getChildLogger: (name: string | (() => string)) => WebpackLogger;
|
15495
15760
|
error(...args: any[]): void;
|
15496
15761
|
warn(...args: any[]): void;
|
15497
15762
|
info(...args: any[]): void;
|
@@ -15739,6 +16004,12 @@ declare interface WebpackPluginInstance {
|
|
15739
16004
|
*/
|
15740
16005
|
apply: (compiler: Compiler) => void;
|
15741
16006
|
}
|
16007
|
+
|
16008
|
+
declare interface WebpackRequire {
|
16009
|
+
(id: string): any;
|
16010
|
+
i?: ((options: ExecuteOptions) => void)[];
|
16011
|
+
c?: Record<string, ExecuteModuleObject>;
|
16012
|
+
}
|
15742
16013
|
declare interface WithId {
|
15743
16014
|
id: string | number;
|
15744
16015
|
}
|
@@ -15747,7 +16018,7 @@ declare interface WithOptions {
|
|
15747
16018
|
* create a resolver with additional/different options
|
15748
16019
|
*/
|
15749
16020
|
withOptions: (
|
15750
|
-
|
16021
|
+
options: Partial<ResolveOptionsWithDependencyType>
|
15751
16022
|
) => ResolverWithOptions;
|
15752
16023
|
}
|
15753
16024
|
declare interface WriteFile {
|
@@ -15768,7 +16039,7 @@ declare interface WriteFile {
|
|
15768
16039
|
| Float64Array
|
15769
16040
|
| DataView,
|
15770
16041
|
options: WriteFileOptions,
|
15771
|
-
callback: (
|
16042
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
15772
16043
|
): void;
|
15773
16044
|
(
|
15774
16045
|
file: PathOrFileDescriptorFs,
|
@@ -15786,7 +16057,7 @@ declare interface WriteFile {
|
|
15786
16057
|
| Float32Array
|
15787
16058
|
| Float64Array
|
15788
16059
|
| DataView,
|
15789
|
-
callback: (
|
16060
|
+
callback: (err: null | NodeJS.ErrnoException) => void
|
15790
16061
|
): void;
|
15791
16062
|
}
|
15792
16063
|
type WriteFileOptions =
|
@@ -15798,10 +16069,10 @@ type WriteFileOptions =
|
|
15798
16069
|
| "utf-16le"
|
15799
16070
|
| "ucs2"
|
15800
16071
|
| "ucs-2"
|
15801
|
-
| "latin1"
|
15802
|
-
| "binary"
|
15803
16072
|
| "base64"
|
15804
16073
|
| "base64url"
|
16074
|
+
| "latin1"
|
16075
|
+
| "binary"
|
15805
16076
|
| "hex"
|
15806
16077
|
| (ObjectEncodingOptions &
|
15807
16078
|
Abortable & { mode?: string | number; flag?: string; flush?: boolean });
|
@@ -15819,10 +16090,10 @@ declare interface WriteStreamOptions {
|
|
15819
16090
|
| "utf-16le"
|
15820
16091
|
| "ucs2"
|
15821
16092
|
| "ucs-2"
|
15822
|
-
| "latin1"
|
15823
|
-
| "binary"
|
15824
16093
|
| "base64"
|
15825
16094
|
| "base64url"
|
16095
|
+
| "latin1"
|
16096
|
+
| "binary"
|
15826
16097
|
| "hex";
|
15827
16098
|
fd?: any;
|
15828
16099
|
mode?: number;
|
@@ -15904,7 +16175,9 @@ declare namespace exports {
|
|
15904
16175
|
callback?: CallbackWebpack<MultiStats>
|
15905
16176
|
): MultiCompiler;
|
15906
16177
|
};
|
15907
|
-
export const validate: (
|
16178
|
+
export const validate: (
|
16179
|
+
configuration: Configuration | Configuration[]
|
16180
|
+
) => void;
|
15908
16181
|
export const validateSchema: (
|
15909
16182
|
schema: Parameters<typeof validateFunction>[0],
|
15910
16183
|
options: Parameters<typeof validateFunction>[1],
|
@@ -15912,7 +16185,45 @@ declare namespace exports {
|
|
15912
16185
|
) => void;
|
15913
16186
|
export const version: string;
|
15914
16187
|
export namespace cli {
|
15915
|
-
export let getArguments: (
|
16188
|
+
export let getArguments: (
|
16189
|
+
schema?:
|
16190
|
+
| (JSONSchema4 &
|
16191
|
+
Extend & {
|
16192
|
+
absolutePath: boolean;
|
16193
|
+
instanceof: string;
|
16194
|
+
cli: {
|
16195
|
+
helper?: boolean;
|
16196
|
+
exclude?: boolean;
|
16197
|
+
description?: string;
|
16198
|
+
negatedDescription?: string;
|
16199
|
+
resetDescription?: string;
|
16200
|
+
};
|
16201
|
+
})
|
16202
|
+
| (JSONSchema6 &
|
16203
|
+
Extend & {
|
16204
|
+
absolutePath: boolean;
|
16205
|
+
instanceof: string;
|
16206
|
+
cli: {
|
16207
|
+
helper?: boolean;
|
16208
|
+
exclude?: boolean;
|
16209
|
+
description?: string;
|
16210
|
+
negatedDescription?: string;
|
16211
|
+
resetDescription?: string;
|
16212
|
+
};
|
16213
|
+
})
|
16214
|
+
| (JSONSchema7 &
|
16215
|
+
Extend & {
|
16216
|
+
absolutePath: boolean;
|
16217
|
+
instanceof: string;
|
16218
|
+
cli: {
|
16219
|
+
helper?: boolean;
|
16220
|
+
exclude?: boolean;
|
16221
|
+
description?: string;
|
16222
|
+
negatedDescription?: string;
|
16223
|
+
resetDescription?: string;
|
16224
|
+
};
|
16225
|
+
})
|
16226
|
+
) => Flags;
|
15916
16227
|
export let processArguments: (
|
15917
16228
|
args: Flags,
|
15918
16229
|
config: any,
|
@@ -15944,19 +16255,10 @@ declare namespace exports {
|
|
15944
16255
|
export let REGEXP_NAMESPACE: RegExp;
|
15945
16256
|
export let createFilename: (
|
15946
16257
|
module: string | Module,
|
15947
|
-
options: any,
|
16258
|
+
options: { namespace?: string; moduleFilenameTemplate?: any },
|
15948
16259
|
__2: {
|
15949
|
-
/**
|
15950
|
-
* requestShortener
|
15951
|
-
*/
|
15952
16260
|
requestShortener: RequestShortener;
|
15953
|
-
/**
|
15954
|
-
* chunk graph
|
15955
|
-
*/
|
15956
16261
|
chunkGraph: ChunkGraph;
|
15957
|
-
/**
|
15958
|
-
* the hash function to use
|
15959
|
-
*/
|
15960
16262
|
hashFunction?: string | typeof Hash;
|
15961
16263
|
}
|
15962
16264
|
) => string;
|
@@ -16114,7 +16416,7 @@ declare namespace exports {
|
|
16114
16416
|
export let inferDependencyUsage: (state: ParserState) => void;
|
16115
16417
|
export let onUsage: (
|
16116
16418
|
state: ParserState,
|
16117
|
-
onUsageCallback: (
|
16419
|
+
onUsageCallback: (value?: boolean | Set<string>) => void
|
16118
16420
|
) => void;
|
16119
16421
|
export let setTopLevelSymbol: (
|
16120
16422
|
state: ParserState,
|
@@ -16140,7 +16442,10 @@ declare namespace exports {
|
|
16140
16442
|
) =>
|
16141
16443
|
| null
|
16142
16444
|
| false
|
16143
|
-
| ((
|
16445
|
+
| ((
|
16446
|
+
moduleGraphConnection: ModuleGraphConnection,
|
16447
|
+
runtime: RuntimeSpec
|
16448
|
+
) => ConnectionState);
|
16144
16449
|
export { TopLevelSymbol, topLevelSymbolTag };
|
16145
16450
|
}
|
16146
16451
|
export {
|
@@ -16285,7 +16590,7 @@ declare namespace exports {
|
|
16285
16590
|
) => RuntimeSpec;
|
16286
16591
|
export let forEachRuntime: (
|
16287
16592
|
runtime: RuntimeSpec,
|
16288
|
-
fn: (
|
16593
|
+
fn: (runtime?: string) => void,
|
16289
16594
|
deterministicOrder?: boolean
|
16290
16595
|
) => void;
|
16291
16596
|
export let getRuntimeKey: (runtime: RuntimeSpec) => string;
|
@@ -16326,7 +16631,7 @@ declare namespace exports {
|
|
16326
16631
|
) => RuntimeCondition;
|
16327
16632
|
export let filterRuntime: (
|
16328
16633
|
runtime: RuntimeSpec,
|
16329
|
-
filter: (
|
16634
|
+
filter: (runtime?: RuntimeSpec) => boolean
|
16330
16635
|
) => undefined | string | boolean | SortableSet<string>;
|
16331
16636
|
export { RuntimeSpecMap, RuntimeSpecSet };
|
16332
16637
|
}
|
@@ -16339,7 +16644,7 @@ declare namespace exports {
|
|
16339
16644
|
) => void;
|
16340
16645
|
export const registerLoader: (
|
16341
16646
|
regExp: RegExp,
|
16342
|
-
loader: (
|
16647
|
+
loader: (request: string) => boolean
|
16343
16648
|
) => void;
|
16344
16649
|
export const registerNotSerializable: (Constructor: Constructor) => void;
|
16345
16650
|
export const NOT_SERIALIZABLE: object;
|
@@ -16356,12 +16661,12 @@ declare namespace exports {
|
|
16356
16661
|
) => T | O | (T & O);
|
16357
16662
|
export function compileBooleanMatcher(
|
16358
16663
|
map: Record<string | number, boolean>
|
16359
|
-
): boolean | ((
|
16664
|
+
): boolean | ((value: string) => string);
|
16360
16665
|
export namespace compileBooleanMatcher {
|
16361
16666
|
export let fromLists: (
|
16362
16667
|
positiveItems: string[],
|
16363
16668
|
negativeItems: string[]
|
16364
|
-
) => (
|
16669
|
+
) => (value: string) => string;
|
16365
16670
|
export let itemsToRegexp: (itemsArr: string[]) => string;
|
16366
16671
|
}
|
16367
16672
|
export { LazySet };
|