Closed
Description
TypeScript Version: 2.7.0-dev.201xxxxx
Code
/** @typedef {{ title: string, colors: !Array.<string>, mutable: boolean }} */
ColorPicker.Spectrum.Palette;
// ...later
ColorPicker.Spectrum.PaletteGenerator = class {
/**
* @param {function(!ColorPicker.Spectrum.Palette)} callback
*/
constructor(callback) {
this._callback = callback;
/** @type {!Map.<string, number>} */
this._frequencyMap = new Map();
var stylesheetPromises = [];
for (var cssModel of SDK.targetManager.models(SDK.CSSModel)) {
for (var stylesheet of cssModel.allStyleSheets())
stylesheetPromises.push(this._processStylesheet(stylesheet));
}
Promise.all(stylesheetPromises).catchException(null).then(this._finish.bind(this));
}
}
Expected behavior:
ColorPicker.Spectrum.Palette
is effectively a type alias for the type in the typedef.
Actual behavior:
front_end/color_picker/Spectrum.js(836,77): error TS1003: Identifier expected.
(A parse error on the trailing *
of the typedef
).
This is used everywhere in the chrome devtools codebase.