π Search Terms
extends js TS7 jsdoc
nothing seemed directly related
π Version & Regression Information
"typescript-7": "npm:typescript@7.1.0-dev.20260826.1"
β― Playground Link
https://github.com/NullVoxPopuli-ai-agent/typescript-go-jsdoc-extends-call-heritage
π» Code
https://github.com/NullVoxPopuli-ai-agent/typescript-go-jsdoc-extends-call-heritage
// @ts-check
/**
* @template T
*/
class Base {
/** @returns {T} */
get value() {
throw new Error();
}
/** @returns {typeof Base} */
static extend() {
return this;
}
}
/** @extends {Base<string>} */
class ViaCall extends Base.extend() {}
/** @extends {Base<string>} */
class ViaIdentifier extends Base {}
/** @type {string} */
const a = new ViaIdentifier().value; // ok in both
/** @type {string} */
const b = new ViaCall().value; // error in TS 7 only
π Actual behavior
Version 7.1.0-dev.20260826.1
repro.js:18:23 - error TS8026: Expected Base<T> type arguments; provide these with an '@extends' tag.
18 class ViaCall extends Base.extend() {}
~~~~~~~~~~~~~
Found 1 error in repro.js:18
π Expected behavior
no error in TS7
Additional information about the issue
No response
π Search Terms
extends js TS7 jsdocnothing seemed directly related
π Version & Regression Information
β― Playground Link
https://github.com/NullVoxPopuli-ai-agent/typescript-go-jsdoc-extends-call-heritage
π» Code
https://github.com/NullVoxPopuli-ai-agent/typescript-go-jsdoc-extends-call-heritage
π Actual behavior
π Expected behavior
no error in TS7
Additional information about the issue
No response