diff --git a/lib/FunctionModuleTemplatePlugin.js b/lib/FunctionModuleTemplatePlugin.js index 7664c0d85..23976edba 100644 --- a/lib/FunctionModuleTemplatePlugin.js +++ b/lib/FunctionModuleTemplatePlugin.js @@ -30,7 +30,7 @@ class FunctionModuleTemplatePlugin { args.push(module.exportsArgument); if ( module.hasDependencies(d => { - const depAsAny = /** @type {any} */ (d); + const depAsAny = /** @type {TODO} */ (d); return depAsAny.requireWebpackRequire !== false; }) ) { diff --git a/lib/NormalModule.js b/lib/NormalModule.js index f81c48ba3..b430b4d1a 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -535,7 +535,7 @@ class NormalModule extends Module { }); // TODO remove cast when webpack-sources types are fixed // CachedSource is not a Source? - const fixedSource = /** @type {any} */ (cachedSource); + const fixedSource = /** @type {TODO} */ (cachedSource); return fixedSource; } diff --git a/lib/Stats.js b/lib/Stats.js index 27e7510b2..3a04ac356 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -576,7 +576,7 @@ class Stats { return 0; }) .map(reason => { - const depAsAny = /** @type {any} */ (reason.dependency); + const depAsAny = /** @type {TODO} */ (reason.dependency); const obj = { moduleId: reason.originModule ? reason.originModule.id : null, moduleIdentifier: reason.originModule diff --git a/lib/wasm/WasmFinalizeExportsPlugin.js b/lib/wasm/WasmFinalizeExportsPlugin.js index ec3768695..d3fff533f 100644 --- a/lib/wasm/WasmFinalizeExportsPlugin.js +++ b/lib/wasm/WasmFinalizeExportsPlugin.js @@ -50,7 +50,7 @@ class WasmFinalizeExportsPlugin { ) ) { // 4. error - /** @type {any} */ + /** @type {TODO} */ const error = new UnsupportedWebAssemblyFeatureError( `Export "${name}" with ${ jsIncompatibleExports[name] diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index 93ff5d354..a33fe1a4a 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -396,7 +396,7 @@ class WebAssemblyGenerator extends Generator { const source = module.originalSource().source(); // TODO remove this casts when webpack-sources is fixed // source() should have return type (string | Buffer) - const sourceAsAny = /** @type {any} */ (source); + const sourceAsAny = /** @type {TODO} */ (source); let bin = /** @type {ArrayBuffer} */ (sourceAsAny); bin = preprocess(bin); diff --git a/lib/wasm/WebAssemblyJavascriptGenerator.js b/lib/wasm/WebAssemblyJavascriptGenerator.js index a2ebd8f88..1e22d11b6 100644 --- a/lib/wasm/WebAssemblyJavascriptGenerator.js +++ b/lib/wasm/WebAssemblyJavascriptGenerator.js @@ -35,7 +35,7 @@ class WebAssemblyJavascriptGenerator extends Generator { const initParams = []; let index = 0; for (const dep of module.dependencies) { - const depAsAny = /** @type {any} */ (dep); + const depAsAny = /** @type {TODO} */ (dep); if (moduleGraph.getModule(dep)) { let importData = importedModules.get(moduleGraph.getModule(dep)); if (importData === undefined) { diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index d48f0d540..35df13ff7 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -325,7 +325,7 @@ class JsonpMainTemplatePlugin { ); mainTemplate.hooks.requireEnsure.tap( // TODO typing are broken - /** @type {any} */ ({ + /** @type {TODO} */ ({ name: "JsonpMainTemplatePlugin preload", stage: 10 }), diff --git a/tooling/inherit-types.js b/tooling/inherit-types.js index cf9bf32de..4078be3c1 100644 --- a/tooling/inherit-types.js +++ b/tooling/inherit-types.js @@ -75,8 +75,8 @@ for (const sourceFile of program.getSourceFiles()) { member.name.getText() ); if (baseDecl) { - const memberAsAny = /** @type {any} */ (member); - const baseDeclAsAny = /** @type {any} */ (baseDecl); + const memberAsAny = /** @type {TODO} */ (member); + const baseDeclAsAny = /** @type {TODO} */ (baseDecl); const currentJsDoc = memberAsAny.jsDoc && memberAsAny.jsDoc[0]; const baseJsDoc = baseDeclAsAny.jsDoc && baseDeclAsAny.jsDoc[0]; const currentJsDocText =