🔎 Search Terms
WeakMap constructors return type JSDoc
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?filetype=js#code/MYGwhgzhAEDCD2J4CcCyYAO0CmAPALtgHYAmMA6tmANbpYDeAUNNMPERPsgK7D4oAKAJTQmLFhG4ZsyYQG5m0AL6MlQA
💻 Code
class ColorMap extends WeakMap {
constructor() {
super();
}
}
🙁 Actual behavior
color.js(1,24): error TS2510: Base constructors must all have the same return type.
I tried a few different workarounds, like adding @template generic params, or forcing types using @type JSDoc, but nothing seems to work.
🙂 Expected behavior
No error.
Additional information about the issue
No response
🔎 Search Terms
WeakMap constructors return type JSDoc
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?filetype=js#code/MYGwhgzhAEDCD2J4CcCyYAO0CmAPALtgHYAmMA6tmANbpYDeAUNNMPERPsgK7D4oAKAJTQmLFhG4ZsyYQG5m0AL6MlQA
💻 Code
🙁 Actual behavior
I tried a few different workarounds, like adding @template generic params, or forcing types using @type JSDoc, but nothing seems to work.
🙂 Expected behavior
No error.
Additional information about the issue
No response