π 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 (@template) generic params, or forcing types using Type (@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 (@template) generic params, or forcing types using Type (@type) JSDoc, but nothing seems to work.
π Expected behavior
No error.
Additional information about the issue
No response