- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.1k
Closed
Description
Bug Report
🔎 Search Terms
- default for a type parameter
- JSdoc default type parameter
🕗 Version & Regression Information
💻 Code
This is the demo code on your website
/** @template [T=object] */
class Cache { // hover `Cache` to see: 'class Cache <T = object>'
    /** @param {T} initial */
    constructor(T) {
    }
}
let c = new Cache()When I copy those code, and use tsc to generate a .d.ts file. In that .d.ts file, Cache  dose not have a generate template.
🙁 Actual behavior
output .d.ts:
There is no template defaults, and event no template.
/** @template [T=object] */
export class Cache {
    /** @param {T} initial */
    constructor(T: any);
}🙂 Expected behavior
output .d.ts should be:
/** @template [T=object] */
export class Cache<T = object> {
    /** @param {T} initial */
    constructor(T: any);
}Metadata
Metadata
Assignees
Labels
No labels