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); args.push(module.exportsArgument);
if ( if (
module.hasDependencies(d => { module.hasDependencies(d => {
const depAsAny = /** @type {any} */ (d); const depAsAny = /** @type {TODO} */ (d);
return depAsAny.requireWebpackRequire !== false; return depAsAny.requireWebpackRequire !== false;
}) })
) { ) {

View File

@ -535,7 +535,7 @@ class NormalModule extends Module {
}); });
// TODO remove cast when webpack-sources types are fixed // TODO remove cast when webpack-sources types are fixed
// CachedSource is not a Source? // CachedSource is not a Source?
const fixedSource = /** @type {any} */ (cachedSource); const fixedSource = /** @type {TODO} */ (cachedSource);
return fixedSource; return fixedSource;
} }

View File

@ -576,7 +576,7 @@ class Stats {
return 0; return 0;
}) })
.map(reason => { .map(reason => {
const depAsAny = /** @type {any} */ (reason.dependency); const depAsAny = /** @type {TODO} */ (reason.dependency);
const obj = { const obj = {
moduleId: reason.originModule ? reason.originModule.id : null, moduleId: reason.originModule ? reason.originModule.id : null,
moduleIdentifier: reason.originModule moduleIdentifier: reason.originModule

View File

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

View File

@ -396,7 +396,7 @@ class WebAssemblyGenerator extends Generator {
const source = module.originalSource().source(); const source = module.originalSource().source();
// TODO remove this casts when webpack-sources is fixed // TODO remove this casts when webpack-sources is fixed
// source() should have return type (string | Buffer) // source() should have return type (string | Buffer)
const sourceAsAny = /** @type {any} */ (source); const sourceAsAny = /** @type {TODO} */ (source);
let bin = /** @type {ArrayBuffer} */ (sourceAsAny); let bin = /** @type {ArrayBuffer} */ (sourceAsAny);
bin = preprocess(bin); bin = preprocess(bin);

View File

@ -35,7 +35,7 @@ class WebAssemblyJavascriptGenerator extends Generator {
const initParams = []; const initParams = [];
let index = 0; let index = 0;
for (const dep of module.dependencies) { for (const dep of module.dependencies) {
const depAsAny = /** @type {any} */ (dep); const depAsAny = /** @type {TODO} */ (dep);
if (moduleGraph.getModule(dep)) { if (moduleGraph.getModule(dep)) {
let importData = importedModules.get(moduleGraph.getModule(dep)); let importData = importedModules.get(moduleGraph.getModule(dep));
if (importData === undefined) { if (importData === undefined) {

View File

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

View File

@ -75,8 +75,8 @@ for (const sourceFile of program.getSourceFiles()) {
member.name.getText() member.name.getText()
); );
if (baseDecl) { if (baseDecl) {
const memberAsAny = /** @type {any} */ (member); const memberAsAny = /** @type {TODO} */ (member);
const baseDeclAsAny = /** @type {any} */ (baseDecl); const baseDeclAsAny = /** @type {TODO} */ (baseDecl);
const currentJsDoc = memberAsAny.jsDoc && memberAsAny.jsDoc[0]; const currentJsDoc = memberAsAny.jsDoc && memberAsAny.jsDoc[0];
const baseJsDoc = baseDeclAsAny.jsDoc && baseDeclAsAny.jsDoc[0]; const baseJsDoc = baseDeclAsAny.jsDoc && baseDeclAsAny.jsDoc[0];
const currentJsDocText = const currentJsDocText =