add more types
This commit is contained in:
parent
a14f073b35
commit
4fc44a3398
|
@ -8,6 +8,7 @@
|
|||
const util = require("util");
|
||||
const memorize = require("./util/memorize");
|
||||
|
||||
/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */
|
||||
/** @typedef {import("./Compilation")} Compilation */
|
||||
|
||||
const getJavascriptModulesPlugin = memorize(() =>
|
||||
|
@ -17,7 +18,7 @@ const getJavascriptModulesPlugin = memorize(() =>
|
|||
// TODO webpack 6 remove this class
|
||||
class ChunkTemplate {
|
||||
/**
|
||||
* @param {TODO} outputOptions TODO
|
||||
* @param {OutputOptions} outputOptions output options
|
||||
* @param {Compilation} compilation the compilation
|
||||
*/
|
||||
constructor(outputOptions, compilation) {
|
||||
|
@ -124,7 +125,7 @@ Object.defineProperty(ChunkTemplate.prototype, "outputOptions", {
|
|||
get: util.deprecate(
|
||||
/**
|
||||
* @this {ChunkTemplate}
|
||||
* @returns {TODO} output options
|
||||
* @returns {OutputOptions} output options
|
||||
*/
|
||||
function () {
|
||||
return this._outputOptions;
|
||||
|
|
|
@ -14,6 +14,8 @@ const ConcatenatedModule = require("./optimize/ConcatenatedModule");
|
|||
const { absolutify } = require("./util/identifier");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../declarations/WebpackOptions").DevTool} DevToolOptions */
|
||||
/** @typedef {import("../declarations/plugins/SourceMapDevToolPlugin").SourceMapDevToolPluginOptions} SourceMapDevToolPluginOptions */
|
||||
/** @typedef {import("./Compiler")} Compiler */
|
||||
|
||||
/** @type {WeakMap<Source, Source>} */
|
||||
|
@ -31,13 +33,17 @@ const devtoolWarning = new RawSource(`/*
|
|||
|
||||
class EvalSourceMapDevToolPlugin {
|
||||
/**
|
||||
* @param {TODO} options Options object
|
||||
* @param {SourceMapDevToolPluginOptions|string} inputOptions Options object
|
||||
*/
|
||||
constructor(options = {}) {
|
||||
if (typeof options === "string") {
|
||||
constructor(inputOptions) {
|
||||
/** @type {SourceMapDevToolPluginOptions} */
|
||||
let options;
|
||||
if (typeof inputOptions === "string") {
|
||||
options = {
|
||||
append: options
|
||||
append: inputOptions
|
||||
};
|
||||
} else {
|
||||
options = inputOptions;
|
||||
}
|
||||
this.sourceMapComment =
|
||||
options.append || "//# sourceURL=[module]\n//# sourceMappingURL=[url]";
|
||||
|
|
|
@ -12,6 +12,7 @@ const memorize = require("./util/memorize");
|
|||
|
||||
/** @typedef {import("webpack-sources").ConcatSource} ConcatSource */
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */
|
||||
/** @typedef {import("./ModuleTemplate")} ModuleTemplate */
|
||||
/** @typedef {import("./Chunk")} Chunk */
|
||||
/** @typedef {import("./Compilation")} Compilation */
|
||||
|
@ -37,11 +38,11 @@ const getJsonpTemplatePlugin = memorize(() =>
|
|||
class MainTemplate {
|
||||
/**
|
||||
*
|
||||
* @param {TODO} outputOptions output options for the MainTemplate
|
||||
* @param {OutputOptions} outputOptions output options for the MainTemplate
|
||||
* @param {Compilation} compilation the compilation
|
||||
*/
|
||||
constructor(outputOptions, compilation) {
|
||||
/** @type {TODO} */
|
||||
/** @type {OutputOptions} */
|
||||
this._outputOptions = outputOptions || {};
|
||||
this.hooks = Object.freeze({
|
||||
renderManifest: {
|
||||
|
@ -311,7 +312,7 @@ Object.defineProperty(MainTemplate.prototype, "outputOptions", {
|
|||
get: util.deprecate(
|
||||
/**
|
||||
* @this {MainTemplate}
|
||||
* @returns {TODO} output options
|
||||
* @returns {OutputOptions} output options
|
||||
*/
|
||||
function () {
|
||||
return this._outputOptions;
|
||||
|
|
|
@ -14,6 +14,7 @@ const { compareChunksById } = require("./util/comparators");
|
|||
const makeSerializable = require("./util/makeSerializable");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../declarations/WebpackOptions").ResolveOptions} ResolveOptions */
|
||||
/** @typedef {import("../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */
|
||||
/** @typedef {import("./Chunk")} Chunk */
|
||||
/** @typedef {import("./ChunkGroup")} ChunkGroup */
|
||||
|
@ -112,7 +113,7 @@ class Module extends DependenciesBlock {
|
|||
this.debugId = debugId++;
|
||||
|
||||
// Info from Factory
|
||||
/** @type {TODO} */
|
||||
/** @type {ResolveOptions} */
|
||||
this.resolveOptions = EMPTY_RESOLVE_OPTIONS;
|
||||
/** @type {object | undefined} */
|
||||
this.factoryMeta = undefined;
|
||||
|
@ -597,8 +598,8 @@ class Module extends DependenciesBlock {
|
|||
|
||||
/**
|
||||
* @deprecated Use needBuild instead
|
||||
* @param {TODO} fileTimestamps timestamps of files
|
||||
* @param {TODO} contextTimestamps timestamps of directories
|
||||
* @param {Map<string, number|null>} fileTimestamps timestamps of files
|
||||
* @param {Map<string, number|null>} contextTimestamps timestamps of directories
|
||||
* @returns {boolean} true, if the module needs a rebuild
|
||||
*/
|
||||
needRebuild(fileTimestamps, contextTimestamps) {
|
||||
|
|
|
@ -12,7 +12,7 @@ const makeSerializable = require("./util/makeSerializable");
|
|||
class ModuleBuildError extends WebpackError {
|
||||
/**
|
||||
* @param {string | Error&any} err error thrown
|
||||
* @param {TODO} info additional info
|
||||
* @param {{from?: string|null}} info additional info
|
||||
*/
|
||||
constructor(err, { from = null } = {}) {
|
||||
let message = "Module build failed";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
const WebpackError = require("./WebpackError");
|
||||
|
||||
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
|
||||
/** @typedef {import("./Module")} Module */
|
||||
|
||||
class ModuleDependencyError extends WebpackError {
|
||||
|
@ -14,7 +15,7 @@ class ModuleDependencyError extends WebpackError {
|
|||
* Creates an instance of ModuleDependencyError.
|
||||
* @param {Module} module module tied to dependency
|
||||
* @param {Error} err error thrown
|
||||
* @param {TODO} loc location of dependency
|
||||
* @param {DependencyLocation} loc location of dependency
|
||||
*/
|
||||
constructor(module, err, loc) {
|
||||
super(err.message);
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
|
||||
const WebpackError = require("./WebpackError");
|
||||
|
||||
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
|
||||
/** @typedef {import("./Module")} Module */
|
||||
|
||||
module.exports = class ModuleDependencyWarning extends WebpackError {
|
||||
/**
|
||||
* @param {Module} module module tied to dependency
|
||||
* @param {Error} err error thrown
|
||||
* @param {TODO} loc location of dependency
|
||||
* @param {DependencyLocation} loc location of dependency
|
||||
*/
|
||||
constructor(module, err, loc) {
|
||||
super(err.message);
|
||||
|
|
|
@ -12,7 +12,7 @@ const makeSerializable = require("./util/makeSerializable");
|
|||
class ModuleError extends WebpackError {
|
||||
/**
|
||||
* @param {Error} err error thrown
|
||||
* @param {TODO} info additional info
|
||||
* @param {{from?: string|null}} info additional info
|
||||
*/
|
||||
constructor(err, { from = null } = {}) {
|
||||
let message = "Module Error";
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
const WebpackError = require("./WebpackError");
|
||||
|
||||
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
|
||||
/** @typedef {import("./Module")} Module */
|
||||
|
||||
const previouslyPolyfilledBuiltinModules = {
|
||||
|
@ -44,7 +45,7 @@ class ModuleNotFoundError extends WebpackError {
|
|||
/**
|
||||
* @param {Module} module module tied to dependency
|
||||
* @param {Error&any} err error thrown
|
||||
* @param {TODO} loc location of dependency
|
||||
* @param {DependencyLocation} loc location of dependency
|
||||
*/
|
||||
constructor(module, err, loc) {
|
||||
let message = `Module not found: ${err.toString()}`;
|
||||
|
|
|
@ -12,7 +12,7 @@ const makeSerializable = require("./util/makeSerializable");
|
|||
class ModuleWarning extends WebpackError {
|
||||
/**
|
||||
* @param {Error} warning error thrown
|
||||
* @param {TODO} info additional info
|
||||
* @param {{from?: string|null}} info additional info
|
||||
*/
|
||||
constructor(warning, { from = null } = {}) {
|
||||
let message = "Module Warning";
|
||||
|
|
|
@ -729,7 +729,7 @@ class NormalModule extends Module {
|
|||
const hash = createHash(compilation.outputOptions.hashFunction);
|
||||
if (this._source) {
|
||||
hash.update("source");
|
||||
this._source.updateHash(/** @type {TODO} */ (hash));
|
||||
this._source.updateHash(hash);
|
||||
}
|
||||
hash.update("meta");
|
||||
hash.update(JSON.stringify(this.buildMeta));
|
||||
|
|
|
@ -32,6 +32,7 @@ const { parseResource } = require("./util/identifier");
|
|||
/** @typedef {import("./Generator")} Generator */
|
||||
/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */
|
||||
/** @typedef {import("./ModuleFactory").ModuleFactoryResult} ModuleFactoryResult */
|
||||
/** @typedef {import("./Parser")} Parser */
|
||||
/** @typedef {import("./ResolverFactory")} ResolverFactory */
|
||||
/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */
|
||||
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
|
||||
|
@ -748,6 +749,11 @@ class NormalModuleFactory extends ModuleFactory {
|
|||
return parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} type type
|
||||
* @param {{[k: string]: any}} parserOptions parser options
|
||||
* @returns {Parser} parser
|
||||
*/
|
||||
createParser(type, parserOptions = {}) {
|
||||
const parser = this.hooks.createParser.for(type).call(parserOptions);
|
||||
if (!parser) {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* @property {NormalModule} current
|
||||
* @property {NormalModule} module
|
||||
* @property {Compilation} compilation
|
||||
* @property {TODO} options
|
||||
* @property {{[k: string]: any}} options
|
||||
*/
|
||||
|
||||
/** @typedef {Record<string, any> & ParserStateBase} ParserState */
|
||||
|
|
|
@ -11,6 +11,7 @@ const { compareIds } = require("./util/comparators");
|
|||
|
||||
/** @typedef {import("webpack-sources").ConcatSource} ConcatSource */
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../declarations/WebpackOptions").Output} OutputOptions */
|
||||
/** @typedef {import("./Chunk")} Chunk */
|
||||
/** @typedef {import("./ChunkGraph")} ChunkGraph */
|
||||
/** @typedef {import("./CodeGenerationResults")} CodeGenerationResults */
|
||||
|
@ -44,7 +45,7 @@ const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g;
|
|||
* @property {Chunk} chunk the chunk used to render
|
||||
* @property {string} hash
|
||||
* @property {string} fullHash
|
||||
* @property {TODO} outputOptions
|
||||
* @property {OutputOptions} outputOptions
|
||||
* @property {CodeGenerationResults} codeGenerationResults
|
||||
* @property {{javascript: ModuleTemplate}} moduleTemplates
|
||||
* @property {DependencyTemplates} dependencyTemplates
|
||||
|
|
|
@ -19,7 +19,7 @@ const NullDependency = require("./NullDependency");
|
|||
class ConstDependency extends NullDependency {
|
||||
/**
|
||||
* @param {string} expression the expression
|
||||
* @param {TODO} range the source range
|
||||
* @param {number|[number, number]} range the source range
|
||||
* @param {string[]=} runtimeRequirements runtime requirements
|
||||
*/
|
||||
constructor(expression, range, runtimeRequirements) {
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
const { parseResource } = require("../util/identifier");
|
||||
|
||||
/** @typedef {import("estree").Node} EsTreeNode */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").ModuleOptions} ModuleOptions */
|
||||
/** @typedef {import("../javascript/BasicEvaluatedExpression")} BasicEvaluatedExpression */
|
||||
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */
|
||||
/** @typedef {import("./ContextDependency")} ContextDependency */
|
||||
|
@ -34,8 +36,7 @@ const splitContextFromPrefix = prefix => {
|
|||
};
|
||||
};
|
||||
|
||||
// TODO Use Omit<> type for contextOptions when typescript >= 3.5
|
||||
/** @typedef {Partial<Pick<ContextDependencyOptions, Exclude<keyof ContextDependencyOptions, "resource"|"recursive"|"regExp">>>} PartialContextDependencyOptions */
|
||||
/** @typedef {Partial<Omit<ContextDependencyOptions, "resource"|"recursive"|"regExp">>} PartialContextDependencyOptions */
|
||||
|
||||
/** @typedef {{ new(options: ContextDependencyOptions, range: [number, number], valueRange: [number, number]): ContextDependency }} ContextDependencyConstructor */
|
||||
|
||||
|
@ -43,8 +44,8 @@ const splitContextFromPrefix = prefix => {
|
|||
* @param {ContextDependencyConstructor} Dep the Dependency class
|
||||
* @param {[number, number]} range source range
|
||||
* @param {BasicEvaluatedExpression} param context param
|
||||
* @param {TODO} expr the AST expression
|
||||
* @param {TODO} options options for context creation
|
||||
* @param {EsTreeNode} expr expr
|
||||
* @param {ModuleOptions} options options for context creation
|
||||
* @param {PartialContextDependencyOptions} contextOptions options for the ContextModule
|
||||
* @param {JavascriptParser} parser the parser
|
||||
* @returns {ContextDependency} the created Dependency
|
||||
|
@ -209,7 +210,7 @@ exports.create = (Dep, range, param, expr, options, contextOptions, parser) => {
|
|||
{
|
||||
request: options.exprContextRequest,
|
||||
recursive: options.exprContextRecursive,
|
||||
regExp: options.exprContextRegExp,
|
||||
regExp: /** @type {RegExp} */ (options.exprContextRegExp),
|
||||
mode: "sync",
|
||||
...contextOptions
|
||||
},
|
||||
|
|
|
@ -135,7 +135,7 @@ const EMPTY_COMMENT_OPTIONS = {
|
|||
|
||||
class JavascriptParser extends Parser {
|
||||
/**
|
||||
* @param {TODO} options options
|
||||
* @param {{[k: string]: any}} options options
|
||||
* @param {"module" | "script" | "auto"} sourceType default source type
|
||||
*/
|
||||
constructor(options, sourceType = "auto") {
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
const Watchpack = require("watchpack");
|
||||
|
||||
/** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */
|
||||
/** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */
|
||||
/** @typedef {import("../util/fs").WatchFileSystem} WatchFileSystem */
|
||||
/** @typedef {import("../util/fs").WatchMethod} WatchMethod */
|
||||
|
@ -26,7 +27,7 @@ class NodeWatchFileSystem {
|
|||
* @param {Iterable<string>} directories watched directories
|
||||
* @param {Iterable<string>} missing watched exitance entries
|
||||
* @param {number} startTime timestamp of start time
|
||||
* @param {TODO} options options object
|
||||
* @param {WatchOptions} options options object
|
||||
* @param {function(Error=, Map<string, FileSystemInfoEntry>, Map<string, FileSystemInfoEntry>, Set<string>, Set<string>): void} callback aggregated callback
|
||||
* @param {function(string, number): void} callbackUndelayed callback when the first change was detected
|
||||
* @returns {Watcher} a watcher
|
||||
|
|
|
@ -31,6 +31,7 @@ const contextify = require("../util/identifier").contextify;
|
|||
const makeSerializable = require("../util/makeSerializable");
|
||||
const propertyAccess = require("../util/propertyAccess");
|
||||
|
||||
/** @typedef {import("eslint-scope").Scope} Scope */
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").WebpackOptionsNormalized} WebpackOptions */
|
||||
/** @typedef {import("../ChunkGraph")} ChunkGraph */
|
||||
|
@ -77,8 +78,8 @@ const propertyAccess = require("../util/propertyAccess");
|
|||
* @property {Source} internalSource
|
||||
* @property {ReplaceSource} source
|
||||
* @property {Iterable<string>} runtimeRequirements
|
||||
* @property {TODO} globalScope
|
||||
* @property {TODO} moduleScope
|
||||
* @property {Scope} globalScope
|
||||
* @property {Scope} moduleScope
|
||||
* @property {Map<string, string>} internalNames
|
||||
* @property {Map<string, string>} exportMap
|
||||
* @property {Map<string, ReexportInfo>} reexportMap
|
||||
|
@ -1060,11 +1061,17 @@ class ConcatenatedModule extends Module {
|
|||
// renaming to work correctly
|
||||
for (const childScope of info.moduleScope.childScopes) {
|
||||
if (childScope.type !== "class") continue;
|
||||
if (!childScope.block.superClass) continue;
|
||||
superClassExpressions.push({
|
||||
range: childScope.block.superClass.range,
|
||||
variables: childScope.variables
|
||||
});
|
||||
const block = childScope.block;
|
||||
if (
|
||||
(block.type === "ClassDeclaration" ||
|
||||
block.type === "ClassExpression") &&
|
||||
block.superClass
|
||||
) {
|
||||
superClassExpressions.push({
|
||||
range: block.superClass.range,
|
||||
variables: childScope.variables
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -766,7 +766,7 @@ const SIMPLE_EXTRACTORS = {
|
|||
},
|
||||
moduleReason: {
|
||||
_: (object, reason, { runtime }, { requestShortener }) => {
|
||||
const depAsAny = /** @type {TODO} */ (reason.dependency);
|
||||
const depAsAny = /** @type {Dependency|undefined} */ (reason.dependency);
|
||||
Object.assign(object, {
|
||||
moduleIdentifier: reason.originModule
|
||||
? reason.originModule.identifier()
|
||||
|
@ -787,7 +787,9 @@ const SIMPLE_EXTRACTORS = {
|
|||
active: reason.isActive(runtime),
|
||||
explanation: reason.explanation,
|
||||
userRequest:
|
||||
depAsAny && "userRequest" in depAsAny ? depAsAny.userRequest : null
|
||||
depAsAny && "userRequest" in depAsAny
|
||||
? /** @type {{[k: string]: any}} */ (depAsAny).userRequest
|
||||
: null
|
||||
});
|
||||
if (reason.dependency) {
|
||||
const locInfo = formatLocation(reason.dependency.loc);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
const path = require("path");
|
||||
|
||||
/** @typedef {import("fs").Stats} NodeFsStats */
|
||||
/** @typedef {import("../../declarations/WebpackOptions").WatchOptions} WatchOptions */
|
||||
/** @typedef {import("../FileSystemInfo").FileSystemInfoEntry} FileSystemInfoEntry */
|
||||
|
||||
/** @typedef {function(NodeJS.ErrnoException=): void} Callback */
|
||||
|
@ -32,7 +33,7 @@ const path = require("path");
|
|||
* @param {Iterable<string>} directories watched directories
|
||||
* @param {Iterable<string>} missing watched exitance entries
|
||||
* @param {number} startTime timestamp of start time
|
||||
* @param {TODO} options options object
|
||||
* @param {WatchOptions} options options object
|
||||
* @param {function(Error=, Map<string, FileSystemInfoEntry>, Map<string, FileSystemInfoEntry>, Set<string>, Set<string>): void} callback aggregated callback
|
||||
* @param {function(string, number): void} callbackUndelayed callback when the first change was detected
|
||||
* @returns {Watcher} a watcher
|
||||
|
|
|
@ -40,7 +40,7 @@ const validateSchema = (schema, options) => {
|
|||
validate(schema, options, {
|
||||
name: "Webpack",
|
||||
postFormatter: (formattedError, error) => {
|
||||
const children = /** @type {TODO} */ (error).children;
|
||||
const children = error.children;
|
||||
if (
|
||||
children &&
|
||||
children.some(
|
||||
|
|
|
@ -58,7 +58,6 @@ class WasmFinalizeExportsPlugin {
|
|||
)
|
||||
) {
|
||||
// 4. error
|
||||
/** @type {TODO} */
|
||||
const error = new UnsupportedWebAssemblyFeatureError(
|
||||
`Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies\n` +
|
||||
`It's used from ${connection.originModule.readableIdentifier(
|
||||
|
|
|
@ -15,6 +15,7 @@ const WebAssemblyExportImportedDependency = require("../dependencies/WebAssembly
|
|||
const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
|
||||
|
||||
/** @typedef {import("webpack-sources").Source} Source */
|
||||
/** @typedef {import("../Dependency")} Dependency */
|
||||
/** @typedef {import("../DependencyTemplates")} DependencyTemplates */
|
||||
/** @typedef {import("../Generator").GenerateContext} GenerateContext */
|
||||
/** @typedef {import("../NormalModule")} NormalModule */
|
||||
|
@ -63,7 +64,7 @@ class WebAssemblyJavascriptGenerator extends Generator {
|
|||
const initParams = [];
|
||||
let index = 0;
|
||||
for (const dep of module.dependencies) {
|
||||
const depAsAny = /** @type {TODO} */ (dep);
|
||||
const depAsAny = /** @type {Dependency} */ (dep);
|
||||
if (moduleGraph.getModule(dep)) {
|
||||
let importData = importedModules.get(moduleGraph.getModule(dep));
|
||||
if (importData === undefined) {
|
||||
|
@ -73,7 +74,9 @@ class WebAssemblyJavascriptGenerator extends Generator {
|
|||
importVar: `m${index}`,
|
||||
index,
|
||||
request:
|
||||
"userRequest" in depAsAny ? depAsAny.userRequest : undefined,
|
||||
"userRequest" in depAsAny
|
||||
? /** @type {{[k: string]: any}} */ (depAsAny).userRequest
|
||||
: undefined,
|
||||
names: new Set(),
|
||||
reexports: []
|
||||
})
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"description": "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.",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/eslint-scope": "^3.7.0",
|
||||
"@types/estree": "^0.0.45",
|
||||
"@webassemblyjs/ast": "1.9.0",
|
||||
"@webassemblyjs/helper-module-context": "1.9.0",
|
||||
|
|
|
@ -910,7 +910,7 @@ declare abstract class ChunkTemplate {
|
|||
hash: { tap: (options?: any, fn?: any) => void };
|
||||
hashForChunk: { tap: (options?: any, fn?: any) => void };
|
||||
}>;
|
||||
readonly outputOptions: any;
|
||||
readonly outputOptions: Output;
|
||||
}
|
||||
declare interface CodeGenerationContext {
|
||||
/**
|
||||
|
@ -2490,11 +2490,11 @@ declare class EvalDevToolModulePlugin {
|
|||
apply(compiler: Compiler): void;
|
||||
}
|
||||
declare class EvalSourceMapDevToolPlugin {
|
||||
constructor(options?: any);
|
||||
sourceMapComment: any;
|
||||
moduleFilenameTemplate: any;
|
||||
namespace: any;
|
||||
options: any;
|
||||
constructor(inputOptions: string | SourceMapDevToolPluginOptions);
|
||||
sourceMapComment: string;
|
||||
moduleFilenameTemplate: DevtoolFallbackModuleFilenameTemplate;
|
||||
namespace: string;
|
||||
options: SourceMapDevToolPluginOptions;
|
||||
|
||||
/**
|
||||
* Apply the plugin
|
||||
|
@ -3477,7 +3477,7 @@ declare abstract class JavascriptParser extends Parser {
|
|||
program: SyncBailHook<[Program, Comment[]], boolean | void>;
|
||||
finish: SyncBailHook<[Program, Comment[]], boolean | void>;
|
||||
}>;
|
||||
options: any;
|
||||
options: { [index: string]: any };
|
||||
sourceType: "module" | "script" | "auto";
|
||||
scope: ScopeInfo;
|
||||
state: Record<string, any> & ParserStateBase;
|
||||
|
@ -4049,7 +4049,7 @@ declare abstract class MainTemplate {
|
|||
options?: any
|
||||
) => { path: string; info: AssetInfo };
|
||||
readonly requireFn: string;
|
||||
readonly outputOptions: any;
|
||||
readonly outputOptions: Output;
|
||||
}
|
||||
declare interface MapOptions {
|
||||
columns?: boolean;
|
||||
|
@ -4115,7 +4115,7 @@ declare class Module extends DependenciesBlock {
|
|||
context: string;
|
||||
needId: boolean;
|
||||
debugId: number;
|
||||
resolveOptions: any;
|
||||
resolveOptions: ResolveOptionsWebpackOptions;
|
||||
factoryMeta: any;
|
||||
buildMeta: KnownBuildMeta & Record<string, any>;
|
||||
buildInfo: any;
|
||||
|
@ -4183,7 +4183,10 @@ declare class Module extends DependenciesBlock {
|
|||
context: NeedBuildContext,
|
||||
callback: (arg0: WebpackError, arg1: boolean) => void
|
||||
): void;
|
||||
needRebuild(fileTimestamps?: any, contextTimestamps?: any): boolean;
|
||||
needRebuild(
|
||||
fileTimestamps: Map<string, number>,
|
||||
contextTimestamps: Map<string, number>
|
||||
): boolean;
|
||||
invalidateBuild(): void;
|
||||
identifier(): string;
|
||||
readableIdentifier(requestShortener: RequestShortener): string;
|
||||
|
@ -4916,7 +4919,7 @@ declare abstract class NormalModuleFactory extends ModuleFactory {
|
|||
callback?: any
|
||||
): any;
|
||||
getParser(type?: any, parserOptions?: {}): any;
|
||||
createParser(type?: any, parserOptions?: {}): any;
|
||||
createParser(type: string, parserOptions?: { [index: string]: any }): Parser;
|
||||
getGenerator(type?: any, generatorOptions?: {}): Generator;
|
||||
createGenerator(type?: any, generatorOptions?: {}): any;
|
||||
getResolver(type?: any, resolveOptions?: any): Resolver & WithOptions;
|
||||
|
@ -5747,7 +5750,7 @@ declare interface ParserStateBase {
|
|||
current: NormalModule;
|
||||
module: NormalModule;
|
||||
compilation: Compilation;
|
||||
options: any;
|
||||
options: { [index: string]: any };
|
||||
}
|
||||
declare interface PathData {
|
||||
chunkGraph?: ChunkGraph;
|
||||
|
@ -6162,7 +6165,7 @@ declare interface RenderManifestOptions {
|
|||
chunk: Chunk;
|
||||
hash: string;
|
||||
fullHash: string;
|
||||
outputOptions: any;
|
||||
outputOptions: Output;
|
||||
codeGenerationResults: CodeGenerationResults;
|
||||
moduleTemplates: { javascript: ModuleTemplate };
|
||||
dependencyTemplates: DependencyTemplates;
|
||||
|
@ -8384,7 +8387,7 @@ declare interface WatchFileSystem {
|
|||
directories: Iterable<string>,
|
||||
missing: Iterable<string>,
|
||||
startTime: number,
|
||||
options: any,
|
||||
options: WatchOptions,
|
||||
callback: (
|
||||
arg0: Error,
|
||||
arg1: Map<string, FileSystemInfoEntry>,
|
||||
|
|
26
yarn.lock
26
yarn.lock
|
@ -621,7 +621,23 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
|
||||
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
|
||||
|
||||
"@types/estree@^0.0.45":
|
||||
"@types/eslint-scope@^3.7.0":
|
||||
version "3.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.0.tgz#4792816e31119ebd506902a482caec4951fabd86"
|
||||
integrity sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw==
|
||||
dependencies:
|
||||
"@types/eslint" "*"
|
||||
"@types/estree" "*"
|
||||
|
||||
"@types/eslint@*":
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.2.0.tgz#eb5c5b575237334df24c53195e37b53d66478d7b"
|
||||
integrity sha512-LpUXkr7fnmPXWGxB0ZuLEzNeTURuHPavkC5zuU4sg62/TgL5ZEjamr5Y8b6AftwHtx2bPJasI+CL0TT2JwQ7aA==
|
||||
dependencies:
|
||||
"@types/estree" "*"
|
||||
"@types/json-schema" "*"
|
||||
|
||||
"@types/estree@*", "@types/estree@^0.0.45":
|
||||
version "0.0.45"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884"
|
||||
integrity sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==
|
||||
|
@ -666,10 +682,10 @@
|
|||
jest-diff "^25.2.1"
|
||||
pretty-format "^25.2.1"
|
||||
|
||||
"@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4":
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.4.tgz#38fd73ddfd9b55abb1e1b2ed578cb55bd7b7d339"
|
||||
integrity sha512-8+KAKzEvSUdeo+kmqnKrqgeE+LcA0tjYWFY7RPProVYwnqDjukzO+3b6dLD56rYX5TdWejnEOLJYOIeh4CXKuA==
|
||||
"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4":
|
||||
version "7.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd"
|
||||
integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==
|
||||
|
||||
"@types/mkdirp@^0.5.2":
|
||||
version "0.5.2"
|
||||
|
|
Loading…
Reference in New Issue