UNPKG

webpack

Version:

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.

1,755 lines (1,676 loc) 268 kB
/* * This file was automatically generated. * DO NOT MODIFY BY HAND. * Run `yarn special-lint-fix` to update */ import { ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AssignmentProperty, AwaitExpression, BinaryExpression, BlockStatement, BreakStatement, CatchClause, ChainExpression, ClassBody, ClassDeclaration, ClassExpression, Comment, ConditionalExpression, ContinueStatement, DebuggerStatement, DoWhileStatement, EmptyStatement, ExportAllDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, ExportSpecifier, ExpressionStatement, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, Identifier, IfStatement, ImportDeclaration, ImportDefaultSpecifier, ImportExpression, ImportNamespaceSpecifier, ImportSpecifier, LabeledStatement, LogicalExpression, MemberExpression, MetaProperty, MethodDefinition, NewExpression, ObjectExpression, ObjectPattern, Program, Property, RegExpLiteral, RestElement, ReturnStatement, SequenceExpression, SimpleCallExpression, SimpleLiteral, SpreadElement, Super, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateElement, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression } from "estree"; import { Stats as FsStats, WriteStream } from "fs"; import { default as ValidationError } from "schema-utils/declarations/ValidationError"; import { AsArray, AsyncParallelHook, AsyncSeriesBailHook, AsyncSeriesHook, AsyncSeriesWaterfallHook, HookMap, MultiHook, SyncBailHook, SyncHook, SyncWaterfallHook } from "tapable"; declare class AbstractLibraryPlugin<T> { constructor(__0: { /** * name of the plugin */ pluginName: string; /** * used library type */ type: string; }); /** * Apply the plugin */ apply(compiler: Compiler): void; parseOptions(library: LibraryOptions): false | T; finishEntryModule( module: Module, entryName: string, libraryContext: LibraryContext<T> ): void; runtimeRequirements( chunk: Chunk, set: Set<string>, libraryContext: LibraryContext<T> ): void; render( source: Source, renderContext: RenderContextObject, libraryContext: LibraryContext<T> ): Source; chunkHash( chunk: Chunk, hash: Hash, chunkHashContext: ChunkHashContext, libraryContext: LibraryContext<T> ): void; } declare class AggressiveMergingPlugin { constructor(options?: any); options: any; /** * Apply the plugin */ apply(compiler: Compiler): void; } declare class AggressiveSplittingPlugin { constructor(options?: AggressiveSplittingPluginOptions); options: AggressiveSplittingPluginOptions; /** * Apply the plugin */ apply(compiler: Compiler): void; static wasChunkRecorded(chunk: Chunk): boolean; } declare interface AggressiveSplittingPluginOptions { /** * Extra cost for each chunk (Default: 9.8kiB). */ chunkOverhead?: number; /** * Extra cost multiplicator for entry chunks (Default: 10). */ entryChunkMultiplicator?: number; /** * Byte, max size of per file (Default: 50kiB). */ maxSize?: number; /** * Byte, split point. (Default: 30kiB). */ minSize?: number; } type Amd = false | { [index: string]: any }; declare interface Argument { description: string; simpleType: "string" | "number" | "boolean"; multiple: boolean; configs: ArgumentConfig[]; } declare interface ArgumentConfig { description: string; path: string; multiple: boolean; type: "string" | "number" | "boolean" | "path" | "enum" | "RegExp" | "reset"; values?: any[]; } declare interface Asset { /** * the filename of the asset */ name: string; /** * source of the asset */ source: Source; /** * info about the asset */ info: AssetInfo; } declare interface AssetEmittedInfo { content: Buffer; source: Source; compilation: Compilation; outputPath: string; targetPath: string; } declare interface AssetInfo { /** * true, if the asset can be long term cached forever (contains a hash) */ immutable?: boolean; /** * the value(s) of the full hash used for this asset */ fullhash?: LibraryExport; /** * the value(s) of the chunk hash used for this asset */ chunkhash?: LibraryExport; /** * the value(s) of the module hash used for this asset */ modulehash?: LibraryExport; /** * the value(s) of the content hash used for this asset */ contenthash?: LibraryExport; /** * size in bytes, only set after asset has been emitted */ size?: number; /** * true, when asset is only used for development and doesn't count towards user-facing assets */ development?: boolean; /** * true, when asset ships data for updating an existing application (HMR) */ hotModuleReplacement?: boolean; /** * object of pointers to other assets, keyed by type of relation (only points from parent to child) */ related?: Record<string, LibraryExport>; } type AssetModuleFilename = | string | ((pathData: PathData, assetInfo: AssetInfo) => string); declare abstract class AsyncDependenciesBlock extends DependenciesBlock { groupOptions: { preloadOrder?: number; prefetchOrder?: number; name?: string; entryOptions?: { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >; }; loc: SyntheticDependencyLocation | RealDependencyLocation; request: string; parent: DependenciesBlock; chunkName: string; module: any; } declare abstract class AsyncQueue<T, K, R> { hooks: { beforeAdd: AsyncSeriesHook<[T]>; added: SyncHook<[T], void>; beforeStart: AsyncSeriesHook<[T]>; started: SyncHook<[T], void>; result: SyncHook<[T, Error, R], void>; }; add(item: T, callback: CallbackFunction<R>): void; invalidate(item: T): void; stop(): void; increaseParallelism(): void; decreaseParallelism(): void; isProcessing(item: T): boolean; isQueued(item: T): boolean; isDone(item: T): boolean; } declare class AsyncWebAssemblyModulesPlugin { constructor(options?: any); options: any; /** * Apply the plugin */ apply(compiler: Compiler): void; renderModule(module?: any, renderContext?: any, hooks?: any): any; static getCompilationHooks( compilation: Compilation ): CompilationHooksAsyncWebAssemblyModulesPlugin; } declare class AutomaticPrefetchPlugin { constructor(); /** * Apply the plugin */ apply(compiler: Compiler): void; } type AuxiliaryComment = string | LibraryCustomUmdCommentObject; declare class BannerPlugin { constructor(options: BannerPluginArgument); options: BannerPluginOptions; banner: (data: { hash: string; chunk: Chunk; filename: string }) => string; /** * Apply the plugin */ apply(compiler: Compiler): void; } type BannerPluginArgument = | string | BannerPluginOptions | ((data: { hash: string; chunk: Chunk; filename: string }) => string); declare interface BannerPluginOptions { /** * Specifies the banner. */ banner: | string | ((data: { hash: string; chunk: Chunk; filename: string }) => string); /** * If true, the banner will only be added to the entry chunks. */ entryOnly?: boolean; /** * Exclude all modules matching any of these conditions. */ exclude?: Rules; /** * Include all modules matching any of these conditions. */ include?: Rules; /** * If true, banner will not be wrapped in a comment. */ raw?: boolean; /** * Include all modules that pass test assertion. */ test?: Rules; } declare interface BaseResolveRequest { path: DevTool; descriptionFilePath?: string; descriptionFileRoot?: string; descriptionFileData?: any; relativePath?: string; ignoreSymlinks?: boolean; fullySpecified?: boolean; } declare abstract class BasicEvaluatedExpression { type: number; range: [number, number]; falsy: boolean; truthy: boolean; nullish: boolean; sideEffects: boolean; bool: boolean; number: number; bigint: bigint; regExp: RegExp; string: string; quasis: BasicEvaluatedExpression[]; parts: BasicEvaluatedExpression[]; array: any[]; items: BasicEvaluatedExpression[]; options: BasicEvaluatedExpression[]; prefix: BasicEvaluatedExpression; postfix: BasicEvaluatedExpression; wrappedInnerExpressions: any; identifier: string; rootInfo: { declaredScope: ScopeInfo; freeName: string | true; tagInfo: TagInfo; }; getMembers: () => string[]; expression: NodeEstreeIndex; isUnknown(): boolean; isNull(): boolean; isUndefined(): boolean; isString(): boolean; isNumber(): boolean; isBigInt(): boolean; isBoolean(): boolean; isRegExp(): boolean; isConditional(): boolean; isArray(): boolean; isConstArray(): boolean; isIdentifier(): boolean; isWrapped(): boolean; isTemplateString(): boolean; /** * Is expression a primitive or an object type value? */ isPrimitiveType(): boolean; /** * Is expression a runtime or compile-time value? */ isCompileTimeValue(): boolean; /** * Gets the compile-time value of the expression */ asCompileTimeValue(): any; isTruthy(): boolean; isFalsy(): boolean; isNullish(): boolean; /** * Can this expression have side effects? */ couldHaveSideEffects(): boolean; asBool(): any; asNullish(): boolean; asString(): any; setString(string?: any): BasicEvaluatedExpression; setUndefined(): BasicEvaluatedExpression; setNull(): BasicEvaluatedExpression; setNumber(number?: any): BasicEvaluatedExpression; setBigInt(bigint?: any): BasicEvaluatedExpression; setBoolean(bool?: any): BasicEvaluatedExpression; setRegExp(regExp?: any): BasicEvaluatedExpression; setIdentifier( identifier?: any, rootInfo?: any, getMembers?: any ): BasicEvaluatedExpression; setWrapped( prefix?: any, postfix?: any, innerExpressions?: any ): BasicEvaluatedExpression; setOptions(options?: any): BasicEvaluatedExpression; addOptions(options?: any): BasicEvaluatedExpression; setItems(items?: any): BasicEvaluatedExpression; setArray(array?: any): BasicEvaluatedExpression; setTemplateString( quasis?: any, parts?: any, kind?: any ): BasicEvaluatedExpression; templateStringKind: any; setTruthy(): BasicEvaluatedExpression; setFalsy(): BasicEvaluatedExpression; setNullish(value?: any): BasicEvaluatedExpression; setRange(range?: any): BasicEvaluatedExpression; setSideEffects(sideEffects?: boolean): BasicEvaluatedExpression; setExpression(expression?: any): BasicEvaluatedExpression; } declare abstract class ByTypeGenerator extends Generator { map: any; } declare const CIRCULAR_CONNECTION: unique symbol; declare class Cache { constructor(); hooks: { get: AsyncSeriesBailHook< [ string, Etag, ((result: any, callback: (arg0: Error) => void) => void)[] ], any >; store: AsyncParallelHook<[string, Etag, any]>; storeBuildDependencies: AsyncParallelHook<[Iterable<string>]>; beginIdle: SyncHook<[], void>; endIdle: AsyncParallelHook<[]>; shutdown: AsyncParallelHook<[]>; }; get<T>(identifier: string, etag: Etag, callback: CallbackCache<T>): void; store<T>( identifier: string, etag: Etag, data: T, callback: CallbackCache<void> ): void; /** * After this method has succeeded the cache can only be restored when build dependencies are */ storeBuildDependencies( dependencies: Iterable<string>, callback: CallbackCache<void> ): void; beginIdle(): void; endIdle(callback: CallbackCache<void>): void; shutdown(callback: CallbackCache<void>): void; static STAGE_MEMORY: number; static STAGE_DEFAULT: number; static STAGE_DISK: number; static STAGE_NETWORK: number; } declare abstract class CacheFacade { getChildCache(name: string): CacheFacade; getItemCache(identifier: string, etag: Etag): ItemCacheFacade; getLazyHashedEtag(obj: HashableObject): Etag; mergeEtags(a: Etag, b: Etag): Etag; get<T>(identifier: string, etag: Etag, callback: CallbackCache<T>): void; getPromise<T>(identifier: string, etag: Etag): Promise<T>; store<T>( identifier: string, etag: Etag, data: T, callback: CallbackCache<void> ): void; storePromise<T>(identifier: string, etag: Etag, data: T): Promise<void>; provide<T>( identifier: string, etag: Etag, computer: (arg0: CallbackNormalErrorCache<T>) => void, callback: CallbackNormalErrorCache<T> ): void; providePromise<T>( identifier: string, etag: Etag, computer: () => T | Promise<T> ): Promise<T>; } declare interface CacheGroupSource { key?: string; priority?: number; getName?: (module?: Module, chunks?: Chunk[], key?: string) => string; chunksFilter?: (chunk: Chunk) => boolean; enforce?: boolean; minSize: Record<string, number>; minRemainingSize: Record<string, number>; enforceSizeThreshold: Record<string, number>; maxAsyncSize: Record<string, number>; maxInitialSize: Record<string, number>; minChunks?: number; maxAsyncRequests?: number; maxInitialRequests?: number; filename?: string | ((arg0: PathData, arg1: AssetInfo) => string); idHint?: string; automaticNameDelimiter: string; reuseExistingChunk?: boolean; usedExports?: boolean; } declare interface CacheGroupsContext { moduleGraph: ModuleGraph; chunkGraph: ChunkGraph; } type CacheOptions = boolean | MemoryCacheOptions | FileCacheOptions; type CacheOptionsNormalized = false | MemoryCacheOptions | FileCacheOptions; declare class CachedSource extends Source { constructor(source: Source); constructor(source: Source | (() => Source), cachedData?: any); original(): Source; originalLazy(): Source | (() => Source); getCachedData(): any; } type CallExpression = SimpleCallExpression | NewExpression; declare interface CallbackCache<T> { (err?: WebpackError, result?: T): void; } declare interface CallbackFunction<T> { (err?: Error, result?: T): any; } declare interface CallbackNormalErrorCache<T> { (err?: Error, result?: T): void; } declare interface CallbackWebpack<T> { (err?: Error, stats?: T): void; } declare class Chunk { constructor(name?: string); id: string | number; ids: (string | number)[]; debugId: number; name: string; idNameHints: SortableSet<string>; preventIntegration: boolean; filenameTemplate: string | ((arg0: PathData, arg1: AssetInfo) => string); runtime: string | SortableSet<string>; files: Set<string>; auxiliaryFiles: Set<string>; rendered: boolean; hash: string; contentHash: Record<string, string>; renderedHash: string; chunkReason: string; extraAsync: boolean; readonly entryModule: Module; hasEntryModule(): boolean; addModule(module: Module): boolean; removeModule(module: Module): void; getNumberOfModules(): number; readonly modulesIterable: Iterable<Module>; compareTo(otherChunk: Chunk): 0 | 1 | -1; containsModule(module: Module): boolean; getModules(): Module[]; remove(): void; moveModule(module: Module, otherChunk: Chunk): void; integrate(otherChunk: Chunk): boolean; canBeIntegrated(otherChunk: Chunk): boolean; isEmpty(): boolean; modulesSize(): number; size(options?: ChunkSizeOptions): number; integratedSize(otherChunk: Chunk, options: ChunkSizeOptions): number; getChunkModuleMaps(filterFn: (m: Module) => boolean): ChunkModuleMaps; hasModuleInGraph( filterFn: (m: Module) => boolean, filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean ): boolean; getChunkMaps(realHash: boolean): ChunkMaps; hasRuntime(): boolean; canBeInitial(): boolean; isOnlyInitial(): boolean; getEntryOptions(): { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >; addGroup(chunkGroup: ChunkGroup): void; removeGroup(chunkGroup: ChunkGroup): void; isInGroup(chunkGroup: ChunkGroup): boolean; getNumberOfGroups(): number; readonly groupsIterable: Iterable<ChunkGroup>; disconnectFromGroups(): void; split(newChunk: Chunk): void; updateHash(hash: Hash, chunkGraph: ChunkGraph): void; getAllAsyncChunks(): Set<Chunk>; getAllInitialChunks(): Set<Chunk>; getAllReferencedChunks(): Set<Chunk>; getAllReferencedAsyncEntrypoints(): Set<Entrypoint>; hasAsyncChunks(): boolean; getChildIdsByOrders( chunkGraph: ChunkGraph, filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean ): Record<string, (string | number)[]>; getChildIdsByOrdersMap( chunkGraph: ChunkGraph, includeDirectChildren?: boolean, filterFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean ): Record<string | number, Record<string, (string | number)[]>>; } type ChunkFilename = | string | ((pathData: PathData, assetInfo: AssetInfo) => string); declare class ChunkGraph { constructor(moduleGraph: ModuleGraph); moduleGraph: ModuleGraph; connectChunkAndModule(chunk: Chunk, module: Module): void; disconnectChunkAndModule(chunk: Chunk, module: Module): void; disconnectChunk(chunk: Chunk): void; attachModules(chunk: Chunk, modules: Iterable<Module>): void; attachRuntimeModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void; attachFullHashModules(chunk: Chunk, modules: Iterable<RuntimeModule>): void; replaceModule(oldModule: Module, newModule: Module): void; isModuleInChunk(module: Module, chunk: Chunk): boolean; isModuleInChunkGroup(module: Module, chunkGroup: ChunkGroup): boolean; isEntryModule(module: Module): boolean; getModuleChunksIterable(module: Module): Iterable<Chunk>; getOrderedModuleChunksIterable( module: Module, sortFn: (arg0: Chunk, arg1: Chunk) => 0 | 1 | -1 ): Iterable<Chunk>; getModuleChunks(module: Module): Chunk[]; getNumberOfModuleChunks(module: Module): number; getModuleRuntimes(module: Module): RuntimeSpecSet; getNumberOfChunkModules(chunk: Chunk): number; getChunkModulesIterable(chunk: Chunk): Iterable<Module>; getChunkModulesIterableBySourceType( chunk: Chunk, sourceType: string ): Iterable<Module>; getOrderedChunkModulesIterable( chunk: Chunk, comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1 ): Iterable<Module>; getOrderedChunkModulesIterableBySourceType( chunk: Chunk, sourceType: string, comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1 ): Iterable<Module>; getChunkModules(chunk: Chunk): Module[]; getOrderedChunkModules( chunk: Chunk, comparator: (arg0: Module, arg1: Module) => 0 | 1 | -1 ): Module[]; getChunkModuleIdMap( chunk: Chunk, filterFn: (m: Module) => boolean, includeAllChunks?: boolean ): Record<string | number, (string | number)[]>; getChunkModuleRenderedHashMap( chunk: Chunk, filterFn: (m: Module) => boolean, hashLength?: number, includeAllChunks?: boolean ): Record<string | number, Record<string | number, string>>; getChunkConditionMap( chunk: Chunk, filterFn: (c: Chunk, chunkGraph: ChunkGraph) => boolean ): Record<string | number, boolean>; hasModuleInGraph( chunk: Chunk, filterFn: (m: Module) => boolean, filterChunkFn?: (c: Chunk, chunkGraph: ChunkGraph) => boolean ): boolean; compareChunks(chunkA: Chunk, chunkB: Chunk): 0 | 1 | -1; getChunkModulesSize(chunk: Chunk): number; getChunkModulesSizes(chunk: Chunk): Record<string, number>; getChunkRootModules(chunk: Chunk): Module[]; getChunkSize(chunk: Chunk, options?: ChunkSizeOptions): number; getIntegratedChunksSize( chunkA: Chunk, chunkB: Chunk, options?: ChunkSizeOptions ): number; canChunksBeIntegrated(chunkA: Chunk, chunkB: Chunk): boolean; integrateChunks(chunkA: Chunk, chunkB: Chunk): void; isEntryModuleInChunk(module: Module, chunk: Chunk): boolean; connectChunkAndEntryModule( chunk: Chunk, module: Module, entrypoint?: Entrypoint ): void; connectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void; addFullHashModuleToChunk(chunk: Chunk, module: RuntimeModule): void; disconnectChunkAndEntryModule(chunk: Chunk, module: Module): void; disconnectChunkAndRuntimeModule(chunk: Chunk, module: RuntimeModule): void; disconnectEntryModule(module: Module): void; disconnectEntries(chunk: Chunk): void; getNumberOfEntryModules(chunk: Chunk): number; getNumberOfRuntimeModules(chunk: Chunk): number; getChunkEntryModulesIterable(chunk: Chunk): Iterable<Module>; getChunkEntryDependentChunksIterable(chunk: Chunk): Iterable<Chunk>; hasChunkEntryDependentChunks(chunk: Chunk): boolean; getChunkRuntimeModulesIterable(chunk: Chunk): Iterable<RuntimeModule>; getChunkRuntimeModulesInOrder(chunk: Chunk): RuntimeModule[]; getChunkFullHashModulesIterable(chunk: Chunk): Iterable<RuntimeModule>; getChunkEntryModulesWithChunkGroupIterable( chunk: Chunk ): Iterable<[Module, Entrypoint]>; getBlockChunkGroup(depBlock: AsyncDependenciesBlock): ChunkGroup; connectBlockAndChunkGroup( depBlock: AsyncDependenciesBlock, chunkGroup: ChunkGroup ): void; disconnectChunkGroup(chunkGroup: ChunkGroup): void; getModuleId(module: Module): string | number; setModuleId(module: Module, id: string | number): void; hasModuleHashes( module: Module, runtime: string | SortableSet<string> ): boolean; getModuleHash(module: Module, runtime: string | SortableSet<string>): string; getRenderedModuleHash( module: Module, runtime: string | SortableSet<string> ): string; setModuleHashes( module: Module, runtime: string | SortableSet<string>, hash: string, renderedHash: string ): void; addModuleRuntimeRequirements( module: Module, runtime: string | SortableSet<string>, items: Set<string> ): void; addChunkRuntimeRequirements(chunk: Chunk, items: Set<string>): void; addTreeRuntimeRequirements(chunk: Chunk, items: Iterable<string>): void; getModuleRuntimeRequirements( module: Module, runtime: string | SortableSet<string> ): ReadonlySet<string>; getChunkRuntimeRequirements(chunk: Chunk): ReadonlySet<string>; getTreeRuntimeRequirements(chunk: Chunk): ReadonlySet<string>; static getChunkGraphForModule( module: Module, deprecateMessage: string, deprecationCode: string ): ChunkGraph; static setChunkGraphForModule(module: Module, chunkGraph: ChunkGraph): void; static getChunkGraphForChunk( chunk: Chunk, deprecateMessage: string, deprecationCode: string ): ChunkGraph; static setChunkGraphForChunk(chunk: Chunk, chunkGraph: ChunkGraph): void; } declare abstract class ChunkGroup { groupDebugId: number; options: { preloadOrder?: number; prefetchOrder?: number; name?: string }; chunks: Chunk[]; origins: { module: Module; loc: SyntheticDependencyLocation | RealDependencyLocation; request: string; }[]; index: number; /** * when a new chunk is added to a chunkGroup, addingOptions will occur. */ addOptions(options: { preloadOrder?: number; prefetchOrder?: number; name?: string; }): void; /** * returns the name of current ChunkGroup * sets a new name for current ChunkGroup */ name: string; /** * get a uniqueId for ChunkGroup, made up of its member Chunk debugId's */ readonly debugId: string; /** * get a unique id for ChunkGroup, made up of its member Chunk id's */ readonly id: string; /** * Performs an unshift of a specific chunk */ unshiftChunk(chunk: Chunk): boolean; /** * inserts a chunk before another existing chunk in group */ insertChunk(chunk: Chunk, before: Chunk): boolean; /** * add a chunk into ChunkGroup. Is pushed on or prepended */ pushChunk(chunk: Chunk): boolean; replaceChunk(oldChunk: Chunk, newChunk: Chunk): boolean; removeChunk(chunk: Chunk): boolean; isInitial(): boolean; addChild(group: ChunkGroup): boolean; getChildren(): ChunkGroup[]; getNumberOfChildren(): number; readonly childrenIterable: SortableSet<ChunkGroup>; removeChild(group: ChunkGroup): boolean; addParent(parentChunk: ChunkGroup): boolean; getParents(): ChunkGroup[]; getNumberOfParents(): number; hasParent(parent: ChunkGroup): boolean; readonly parentsIterable: SortableSet<ChunkGroup>; removeParent(chunkGroup: ChunkGroup): boolean; addAsyncEntrypoint(entrypoint: Entrypoint): boolean; readonly asyncEntrypointsIterable: SortableSet<ChunkGroup>; getBlocks(): any[]; getNumberOfBlocks(): number; hasBlock(block?: any): boolean; readonly blocksIterable: Iterable<AsyncDependenciesBlock>; addBlock(block: AsyncDependenciesBlock): boolean; addOrigin( module: Module, loc: SyntheticDependencyLocation | RealDependencyLocation, request: string ): void; getFiles(): string[]; remove(): void; sortItems(): void; /** * Sorting predicate which allows current ChunkGroup to be compared against another. * Sorting values are based off of number of chunks in ChunkGroup. */ compareTo(chunkGraph: ChunkGraph, otherGroup: ChunkGroup): 0 | 1 | -1; getChildrenByOrders( moduleGraph: ModuleGraph, chunkGraph: ChunkGraph ): Record<string, ChunkGroup[]>; /** * Sets the top-down index of a module in this ChunkGroup */ setModulePreOrderIndex(module: Module, index: number): void; /** * Gets the top-down index of a module in this ChunkGroup */ getModulePreOrderIndex(module: Module): number; /** * Sets the bottom-up index of a module in this ChunkGroup */ setModulePostOrderIndex(module: Module, index: number): void; /** * Gets the bottom-up index of a module in this ChunkGroup */ getModulePostOrderIndex(module: Module): number; checkConstraints(): void; getModuleIndex: (module: Module) => number; getModuleIndex2: (module: Module) => number; } declare interface ChunkHashContext { /** * the runtime template */ runtimeTemplate: RuntimeTemplate; /** * the module graph */ moduleGraph: ModuleGraph; /** * the chunk graph */ chunkGraph: ChunkGraph; } declare interface ChunkMaps { hash: Record<string | number, string>; contentHash: Record<string | number, Record<string, string>>; name: Record<string | number, string>; } declare class ChunkModuleIdRangePlugin { constructor(options?: any); options: any; /** * Apply the plugin */ apply(compiler: Compiler): void; } declare interface ChunkModuleMaps { id: Record<string | number, (string | number)[]>; hash: Record<string | number, string>; } declare interface ChunkPathData { id: string | number; name?: string; hash: string; hashWithLength?: (arg0: number) => string; contentHash?: Record<string, string>; contentHashWithLength?: Record<string, (length: number) => string>; } declare class ChunkPrefetchPreloadPlugin { constructor(); apply(compiler: Compiler): void; } declare interface ChunkSizeOptions { /** * constant overhead for a chunk */ chunkOverhead?: number; /** * multiplicator for initial chunks */ entryChunkMultiplicator?: number; } declare abstract class ChunkTemplate { hooks: Readonly<{ renderManifest: { tap: (options?: any, fn?: any) => void }; modules: { tap: (options?: any, fn?: any) => void }; render: { tap: (options?: any, fn?: any) => void }; renderWithEntry: { tap: (options?: any, fn?: any) => void }; hash: { tap: (options?: any, fn?: any) => void }; hashForChunk: { tap: (options?: any, fn?: any) => void }; }>; readonly outputOptions: Output; } declare interface CodeGenerationContext { /** * the dependency templates */ dependencyTemplates: DependencyTemplates; /** * the runtime template */ runtimeTemplate: RuntimeTemplate; /** * the module graph */ moduleGraph: ModuleGraph; /** * the chunk graph */ chunkGraph: ChunkGraph; /** * the runtimes code should be generated for */ runtime: string | SortableSet<string>; /** * when in concatenated module, information about other concatenated modules */ concatenationScope?: ConcatenationScope; } declare interface CodeGenerationResult { /** * the resulting sources for all source types */ sources: Map<string, Source>; /** * the resulting data for all source types */ data?: Map<string, any>; /** * the runtime requirements */ runtimeRequirements: ReadonlySet<string>; } declare abstract class CodeGenerationResults { map: Map<Module, RuntimeSpecMap<CodeGenerationResult>>; get( module: Module, runtime: string | SortableSet<string> ): CodeGenerationResult; getSource( module: Module, runtime: string | SortableSet<string>, sourceType: string ): Source; getRuntimeRequirements( module: Module, runtime: string | SortableSet<string> ): ReadonlySet<string>; getData( module: Module, runtime: string | SortableSet<string>, key: string ): any; add( module: Module, runtime: string | SortableSet<string>, result: CodeGenerationResult ): void; } declare class CompatSource extends Source { constructor(sourceLike: SourceLike); static from(sourceLike: SourceLike): Source; } declare class Compilation { /** * Creates an instance of Compilation. */ constructor(compiler: Compiler); hooks: Readonly<{ buildModule: SyncHook<[Module], void>; rebuildModule: SyncHook<[Module], void>; failedModule: SyncHook<[Module, WebpackError], void>; succeedModule: SyncHook<[Module], void>; stillValidModule: SyncHook<[Module], void>; addEntry: SyncHook< [ Dependency, { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" > ], void >; failedEntry: SyncHook< [ Dependency, { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >, Error ], void >; succeedEntry: SyncHook< [ Dependency, { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >, Module ], void >; dependencyReferencedExports: SyncWaterfallHook< [ (string[] | ReferencedExport)[], Dependency, string | SortableSet<string> ] >; finishModules: AsyncSeriesHook<[Iterable<Module>]>; finishRebuildingModule: AsyncSeriesHook<[Module]>; unseal: SyncHook<[], void>; seal: SyncHook<[], void>; beforeChunks: SyncHook<[], void>; afterChunks: SyncHook<[Iterable<Chunk>], void>; optimizeDependencies: SyncBailHook<[Iterable<Module>], any>; afterOptimizeDependencies: SyncHook<[Iterable<Module>], void>; optimize: SyncHook<[], void>; optimizeModules: SyncBailHook<[Iterable<Module>], any>; afterOptimizeModules: SyncHook<[Iterable<Module>], void>; optimizeChunks: SyncBailHook<[Iterable<Chunk>, ChunkGroup[]], any>; afterOptimizeChunks: SyncHook<[Iterable<Chunk>, ChunkGroup[]], void>; optimizeTree: AsyncSeriesHook<[Iterable<Chunk>, Iterable<Module>]>; afterOptimizeTree: SyncHook<[Iterable<Chunk>, Iterable<Module>], void>; optimizeChunkModules: AsyncSeriesBailHook< [Iterable<Chunk>, Iterable<Module>], any >; afterOptimizeChunkModules: SyncHook< [Iterable<Chunk>, Iterable<Module>], void >; shouldRecord: SyncBailHook<[], boolean>; additionalChunkRuntimeRequirements: SyncHook<[Chunk, Set<string>], void>; runtimeRequirementInChunk: HookMap<SyncBailHook<[Chunk, Set<string>], any>>; additionalModuleRuntimeRequirements: SyncHook<[Module, Set<string>], void>; runtimeRequirementInModule: HookMap< SyncBailHook<[Module, Set<string>], any> >; additionalTreeRuntimeRequirements: SyncHook<[Chunk, Set<string>], void>; runtimeRequirementInTree: HookMap<SyncBailHook<[Chunk, Set<string>], any>>; runtimeModule: SyncHook<[RuntimeModule, Chunk], void>; reviveModules: SyncHook<[Iterable<Module>, any], void>; beforeModuleIds: SyncHook<[Iterable<Module>], void>; moduleIds: SyncHook<[Iterable<Module>], void>; optimizeModuleIds: SyncHook<[Iterable<Module>], void>; afterOptimizeModuleIds: SyncHook<[Iterable<Module>], void>; reviveChunks: SyncHook<[Iterable<Chunk>, any], void>; beforeChunkIds: SyncHook<[Iterable<Chunk>], void>; chunkIds: SyncHook<[Iterable<Chunk>], void>; optimizeChunkIds: SyncHook<[Iterable<Chunk>], void>; afterOptimizeChunkIds: SyncHook<[Iterable<Chunk>], void>; recordModules: SyncHook<[Iterable<Module>, any], void>; recordChunks: SyncHook<[Iterable<Chunk>, any], void>; optimizeCodeGeneration: SyncHook<[Iterable<Module>], void>; beforeModuleHash: SyncHook<[], void>; afterModuleHash: SyncHook<[], void>; beforeCodeGeneration: SyncHook<[], void>; afterCodeGeneration: SyncHook<[], void>; beforeRuntimeRequirements: SyncHook<[], void>; afterRuntimeRequirements: SyncHook<[], void>; beforeHash: SyncHook<[], void>; contentHash: SyncHook<[Chunk], void>; afterHash: SyncHook<[], void>; recordHash: SyncHook<[any], void>; record: SyncHook<[Compilation, any], void>; beforeModuleAssets: SyncHook<[], void>; shouldGenerateChunkAssets: SyncBailHook<[], boolean>; beforeChunkAssets: SyncHook<[], void>; additionalChunkAssets: Pick< AsyncSeriesHook<[Set<Chunk>]>, "tap" | "tapAsync" | "tapPromise" | "name" > & FakeHookMarker; additionalAssets: Pick< AsyncSeriesHook<[]>, "tap" | "tapAsync" | "tapPromise" | "name" > & FakeHookMarker; optimizeChunkAssets: Pick< AsyncSeriesHook<[Set<Chunk>]>, "tap" | "tapAsync" | "tapPromise" | "name" > & FakeHookMarker; afterOptimizeChunkAssets: Pick< AsyncSeriesHook<[Set<Chunk>]>, "tap" | "tapAsync" | "tapPromise" | "name" > & FakeHookMarker; optimizeAssets: AsyncSeriesHook<[Record<string, Source>]>; afterOptimizeAssets: SyncHook<[Record<string, Source>], void>; processAssets: AsyncSeriesHook<[Record<string, Source>]>; afterProcessAssets: SyncHook<[Record<string, Source>], void>; needAdditionalSeal: SyncBailHook<[], boolean>; afterSeal: AsyncSeriesHook<[]>; renderManifest: SyncWaterfallHook< [ (RenderManifestEntryTemplated | RenderManifestEntryStatic)[], RenderManifestOptions ] >; fullHash: SyncHook<[Hash], void>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void>; moduleAsset: SyncHook<[Module, string], void>; chunkAsset: SyncHook<[Chunk, string], void>; assetPath: SyncWaterfallHook<[string, any, AssetInfo]>; needAdditionalPass: SyncBailHook<[], boolean>; childCompiler: SyncHook<[Compiler, string, number], void>; log: SyncBailHook<[string, LogEntry], true>; processWarnings: SyncWaterfallHook<[WebpackError[]]>; processErrors: SyncWaterfallHook<[WebpackError[]]>; statsPreset: HookMap<SyncHook<[any, any], void>>; statsNormalize: SyncHook<[any, any], void>; statsFactory: SyncHook<[StatsFactory, any], void>; statsPrinter: SyncHook<[StatsPrinter, any], void>; readonly normalModuleLoader: SyncHook<[any, NormalModule], void>; }>; name: string; startTime: any; endTime: any; compiler: Compiler; resolverFactory: ResolverFactory; inputFileSystem: InputFileSystem; fileSystemInfo: FileSystemInfo; requestShortener: RequestShortener; compilerPath: string; logger: WebpackLogger; options: WebpackOptionsNormalized; outputOptions: OutputNormalized; bail: boolean; profile: boolean; mainTemplate: MainTemplate; chunkTemplate: ChunkTemplate; runtimeTemplate: RuntimeTemplate; moduleTemplates: { javascript: ModuleTemplate }; moduleGraph: ModuleGraph; chunkGraph: ChunkGraph; codeGenerationResults: CodeGenerationResults; factorizeQueue: AsyncQueue<FactorizeModuleOptions, string, Module>; addModuleQueue: AsyncQueue<Module, string, Module>; buildQueue: AsyncQueue<Module, Module, Module>; rebuildQueue: AsyncQueue<Module, Module, Module>; processDependenciesQueue: AsyncQueue<Module, Module, Module>; /** * Modules in value are building during the build of Module in key. * Means value blocking key from finishing. * Needed to detect build cycles. */ creatingModuleDuringBuild: WeakMap<Module, Set<Module>>; entries: Map<string, EntryData>; globalEntry: EntryData; entrypoints: Map<string, Entrypoint>; asyncEntrypoints: Entrypoint[]; chunks: Set<Chunk>; chunkGroups: ChunkGroup[]; namedChunkGroups: Map<string, ChunkGroup>; namedChunks: Map<string, Chunk>; modules: Set<Module>; records: any; additionalChunkAssets: string[]; assets: Record<string, Source>; assetsInfo: Map<string, AssetInfo>; errors: WebpackError[]; warnings: WebpackError[]; children: Compilation[]; logging: Map<string, LogEntry[]>; dependencyFactories: Map<{ new (...args: any[]): Dependency }, ModuleFactory>; dependencyTemplates: DependencyTemplates; childrenCounters: {}; usedChunkIds: Set<string | number>; usedModuleIds: Set<number>; needAdditionalPass: boolean; builtModules: WeakSet<Module>; codeGeneratedModules: WeakSet<Module>; emittedAssets: Set<string>; comparedForEmitAssets: Set<string>; fileDependencies: LazySet<string>; contextDependencies: LazySet<string>; missingDependencies: LazySet<string>; buildDependencies: LazySet<string>; compilationDependencies: { add: (item?: any) => LazySet<string> }; getStats(): Stats; createStatsOptions(optionsOrPreset?: any, context?: {}): {}; createStatsFactory(options?: any): StatsFactory; createStatsPrinter(options?: any): StatsPrinter; getCache(name: string): CacheFacade; getLogger(name: string | (() => string)): WebpackLogger; addModule( module: Module, callback: (err?: WebpackError, result?: Module) => void ): void; /** * Fetches a module from a compilation by its identifier */ getModule(module: Module): Module; /** * Attempts to search for a module by its identifier */ findModule(identifier: string): Module; /** * Schedules a build of the module object */ buildModule( module: Module, callback: (err?: WebpackError, result?: Module) => void ): void; processModuleDependencies( module: Module, callback: (err?: WebpackError, result?: Module) => void ): void; processModuleDependenciesNonRecursive(module: Module): void; handleModuleCreation( __0: HandleModuleCreationOptions, callback: (err?: WebpackError, result?: Module) => void ): void; factorizeModule( options: FactorizeModuleOptions, callback: (err?: WebpackError, result?: Module) => void ): void; addModuleChain( context: string, dependency: Dependency, callback: (err?: WebpackError, result?: Module) => void ): void; addEntry( context: string, entry: Dependency, optionsOrName: | string | ({ name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >), callback: (err?: WebpackError, result?: Module) => void ): void; addInclude( context: string, dependency: Dependency, options: { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >, callback: (err?: WebpackError, result?: Module) => void ): void; rebuildModule( module: Module, callback: (err?: WebpackError, result?: Module) => void ): void; finish(callback?: any): void; unseal(): void; seal(callback: (err?: WebpackError) => void): void; reportDependencyErrorsAndWarnings( module: Module, blocks: DependenciesBlock[] ): void; codeGeneration(callback?: any): void; processRuntimeRequirements(): void; addRuntimeModule(chunk: Chunk, module: RuntimeModule): void; addChunkInGroup( groupOptions: | string | { preloadOrder?: number; prefetchOrder?: number; name?: string }, module: Module, loc: SyntheticDependencyLocation | RealDependencyLocation, request: string ): ChunkGroup; addAsyncEntrypoint( options: { name?: string } & Pick< EntryDescriptionNormalized, | "filename" | "chunkLoading" | "dependOn" | "library" | "runtime" | "wasmLoading" >, module: Module, loc: SyntheticDependencyLocation | RealDependencyLocation, request: string ): Entrypoint; /** * This method first looks to see if a name is provided for a new chunk, * and first looks to see if any named chunks already exist and reuse that chunk instead. */ addChunk(name?: string): Chunk; assignDepth(module: Module): void; getDependencyReferencedExports( dependency: Dependency, runtime: string | SortableSet<string> ): (string[] | ReferencedExport)[]; removeReasonsOfDependencyBlock( module: Module, block: DependenciesBlockLike ): void; patchChunksAfterReasonRemoval(module: Module, chunk: Chunk): void; removeChunkFromDependencies(block: DependenciesBlock, chunk: Chunk): void; sortItemsWithChunkIds(): void; summarizeDependencies(): void; createModuleHashes(): void; createHash(): void; fullHash: string; hash: string; emitAsset(file: string, source: Source, assetInfo?: AssetInfo): void; updateAsset( file: string, newSourceOrFunction: Source | ((arg0: Source) => Source), assetInfoUpdateOrFunction?: AssetInfo | ((arg0: AssetInfo) => AssetInfo) ): void; renameAsset(file?: any, newFile?: any): void; deleteAsset(file: string): void; getAssets(): Readonly<Asset>[]; getAsset(name: string): Readonly<Asset>; clearAssets(): void; createModuleAssets(): void; getRenderManifest( options: RenderManifestOptions ): (RenderManifestEntryTemplated | RenderManifestEntryStatic)[]; createChunkAssets(callback: (err?: WebpackError) => void): void; getPath( filename: string | ((arg0: PathData, arg1: AssetInfo) => string), data?: PathData ): string; getPathWithInfo( filename: string | ((arg0: PathData, arg1: AssetInfo) => string), data?: PathData ): { path: string; info: AssetInfo }; getAssetPath( filename: string | ((arg0: PathData, arg1: AssetInfo) => string), data: PathData ): string; getAssetPathWithInfo( filename: string | ((arg0: PathData, arg1: AssetInfo) => string), data: PathData ): { path: string; info: AssetInfo }; getWarnings(): WebpackError[]; getErrors(): WebpackError[]; /** * This function allows you to run another instance of webpack inside of webpack however as * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins * from parent (or top level compiler) and creates a child Compilation */ createChildCompiler( name: string, outputOptions: OutputNormalized, plugins: Plugin[] ): Compiler; checkConstraints(): void; /** * Add additional assets to the compilation. */ static PROCESS_ASSETS_STAGE_ADDITIONAL: number; /** * Basic preprocessing of assets. */ static PROCESS_ASSETS_STAGE_PRE_PROCESS: number; /** * Derive new assets from existing assets. * Existing assets should not be treated as complete. */ static PROCESS_ASSETS_STAGE_DERIVED: number; /** * Add additional sections to existing assets, like a banner or initialization code. */ static PROCESS_ASSETS_STAGE_ADDITIONS: number; /** * Optimize existing assets in a general way. */ static PROCESS_ASSETS_STAGE_OPTIMIZE: number; /** * Optimize the count of existing assets, e. g. by merging them. */ static PROCESS_ASSETS_STAGE_OPTIMIZE_COUNT: number; /** * Optimize the compatibility of existing assets, e. g. add polyfills or vendor-prefixes. */ static PROCESS_ASSETS_STAGE_OPTIMIZE_COMPATIBILITY: number; /** * Optimize the size of existing assets, e. g. by minimizing or omitting whitespace. */ static PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: number; /** * Summarize the list of existing assets. * When creating new assets from this they should be fully optimized. * e. g. creating an assets manifest of Service Workers. */ static PROCESS_ASSETS_STAGE_SUMMARIZE: number; /** * Add development tooling to assets, e. g. by extracting a SourceMap. */ static PROCESS_ASSETS_STAGE_DEV_TOOLING: number; /** * Optimize the transfer of existing assets, e. g. by preparing a compressed (gzip) file as separate asset. */ static PROCESS_ASSETS_STAGE_OPTIMIZE_TRANSFER: number; /** * Optimize the hashes of the assets, e. g. by generating real hashes of the asset content. */ static PROCESS_ASSETS_STAGE_OPTIMIZE_HASH: number; /** * Analyse existing assets. */ static PROCESS_ASSETS_STAGE_ANALYSE: number; /** * Creating assets for reporting purposes. */ static PROCESS_ASSETS_STAGE_REPORT: number; } declare interface CompilationHooksAsyncWebAssemblyModulesPlugin { renderModuleContent: SyncWaterfallHook<[Source, Module, RenderContextObject]>; } declare interface CompilationHooksJavascriptModulesPlugin { renderModuleContent: SyncWaterfallHook<[Source, Module, RenderContextObject]>; renderModuleContainer: SyncWaterfallHook< [Source, Module, RenderContextObject] >; renderModulePackage: SyncWaterfallHook<[Source, Module, RenderContextObject]>; renderChunk: SyncWaterfallHook<[Source, RenderContextObject]>; renderMain: SyncWaterfallHook<[Source, RenderContextObject]>; render: SyncWaterfallHook<[Source, RenderContextObject]>; renderRequire: SyncWaterfallHook<[string, RenderBootstrapContext]>; chunkHash: SyncHook<[Chunk, Hash, ChunkHashContext], void>; } declare interface CompilationParams { normalModuleFactory: NormalModuleFactory; contextModuleFactory: ContextModuleFactory; } declare class Compiler { constructor(context: string); hooks: Readonly<{ initialize: SyncHook<[], void>; shouldEmit: SyncBailHook<[Compilation], boolean>; done: AsyncSeriesHook<[Stats]>; afterDone: SyncHook<[Stats], void>; additionalPass: AsyncSeriesHook<[]>; beforeRun: AsyncSeriesHook<[Compiler]>; run: AsyncSeriesHook<[Compiler]>; emit: AsyncSeriesHook<[Compilation]>; assetEmitted: AsyncSeriesHook<[string, AssetEmittedInfo]>; afterEmit: AsyncSeriesHook<[Compilation]>; thisCompilation: SyncHook<[Compilation, CompilationParams], void>; compilation: SyncHook<[Compilation, CompilationParams], void>; normalModuleFactory: SyncHook<[NormalModuleFactory], void>; contextModuleFactory: SyncHook<[ContextModuleFactory], void>; beforeCompile: AsyncSeriesHook<[CompilationParams]>; compile: SyncHook<[CompilationParams], void>; make: AsyncParallelHook<[Compilation]>; finishMake: AsyncParallelHook<[Compilation]>; afterCompile: AsyncSeriesHook<[Compilation]>; watchRun: AsyncSeriesHook<[Compiler]>; failed: SyncHook<[Error], void>; invalid: SyncHook<[string, number], void>; watchClose: SyncHook<[], void>; infrastructureLog: SyncBailHook<[string, string, any[]], true>; environment: SyncHook<[], void>; afterEnvironment: SyncHook<[], void>; afterPlugins: SyncHook<[Compiler], void>; afterResolvers: SyncHook<[Compiler], void>; entryOption: SyncBailHook<[string, EntryNormalized], boolean>; }>; name: string; parentCompilation: Compilation; root: Compiler; outputPath: string; watching: Watching; outputFileSystem: OutputFileSystem; intermediateFileSystem: InputFileSystem & OutputFileSystem & IntermediateFileSystemExtras; inputFileSystem: InputFileSystem; watchFileSystem: WatchFileSystem; recordsInputPath: string; recordsOutputPath: string; records: {}; managedPaths: Set<string>; immutablePaths: Set<string>; modifiedFiles: Set<string>; removedFiles: Set<string>; fileTimestamps: Map<string, FileSystemInfoEntry>; contextTimestamps: Map<string, FileSystemInfoEntry>; resolverFactory: ResolverFactory; infrastructureLogger: any; options: WebpackOptionsNormalized; context: string; requestShortener: RequestShortener; cache: Cache; compilerPath: string; running: boolean; idle: boolean; watchMode: boolean; getCache(name: string): CacheFacade; getInfrastructureLogger(name: string | (() => string)): WebpackLogger; watch(watchOptions: WatchOptions, handler: CallbackFunction<Stats>): Watching; run(callback: CallbackFunction<Stats>): void; runAsChild( callback: (err?: Error, entries?: Chunk[], compilation?: Compilation) => any ): void; purgeInputFileSystem(): void; emitAssets(compilation: Compilation, callback: CallbackFunction<void>): void; emitRecords(callback: CallbackFunction<void>): void; readRecords(callback: CallbackFunction<void>): void; createChildCompiler( compilation: Compilation, compilerName: string, compilerIndex: number, outputOptions: OutputNormalized, plugins: WebpackPluginInstance[] ): Compiler; isChild(): boolean; createCompilation(): Compilation; newCompilation(params: CompilationParams): Compilation; createNormalModuleFactory(): NormalModuleFactory; createContextModuleFactory(): ContextModuleFactory; newCompilationParams(): { normalModuleFactory: NormalModuleFactory; contextModuleFactory: ContextModuleFactory; }; compile(callback: CallbackFunction<Compilation>): void; close(callback: CallbackFunction<void>): void; } declare class ConcatSource extends Source { constructor(...args: (string | Source)[]); getChildren(): Source[]; add(item: string | Source): void; addAllSkipOptimizing(items: Source[]): void; } declare interface ConcatenatedModuleInfo { index: number; module: Module; /** * mapping from export name to symbol */ exportMap: Map<string, string>; /** * mapping from export name to symbol */ rawExportMap: Map<string, string>; namespaceExportSymbol?: string; } declare interface ConcatenationBailoutReasonContext { /** * the module graph */ moduleGraph: ModuleGraph; /** * the chunk graph */ chunkGraph: ChunkGraph; } declare class ConcatenationScope { constructor( modulesWithInfo: (ConcatenatedModuleInfo | ExternalModuleInfo)[], currentModule: ConcatenatedModuleInfo ); isModuleInScope(module: Module): boolean; registerExport(exportName: string, symbol: string): void; registerRawExport(exportName: string, expression: string): void; registerNamespaceExport(symbol: string): void; createModuleReference( module: Module, __1: Partial<ModuleReferenceOptions> ): string; static isModuleReference(name: string): boolean; static matchModuleReference( name: string ): { /** * the properties/exports of the module */ ids: string[]; /** * true, when this referenced export is called */ call: boolean; /** * true, when this referenced export is directly imported (not via property access) */ directImport: boolean; /** * if the position is ASI safe or unknown */ asiSafe: boolean; index: number; }; static DEFAULT_EXPORT: string; static NAMESPACE_OBJECT_EXPORT: string; } /** * Options object as provided by the user. */