add TODOs

This commit is contained in:
Tobias Koppers 2018-08-16 13:12:41 +02:00
parent abbb6bb634
commit a6e1c0693c
8 changed files with 9 additions and 9 deletions

View File

@ -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;
})
) {

View File

@ -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;
}

View File

@ -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

View File

@ -50,7 +50,7 @@ class WasmFinalizeExportsPlugin {
)
) {
// 4. error
/** @type {any} */
/** @type {TODO} */
const error = new UnsupportedWebAssemblyFeatureError(
`Export "${name}" with ${
jsIncompatibleExports[name]

View File

@ -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);

View File

@ -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) {

View File

@ -325,7 +325,7 @@ class JsonpMainTemplatePlugin {
);
mainTemplate.hooks.requireEnsure.tap(
// TODO typing are broken
/** @type {any} */ ({
/** @type {TODO} */ ({
name: "JsonpMainTemplatePlugin preload",
stage: 10
}),

View File

@ -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 =