Skip to content

Default values for type parameters are not used as type arguments #1341

@krisztianb

Description

@krisztianb

Search terms

type-parameters, type-arguments

Expected Behavior

Default values for type parameters are used as type arguments.

Actual Behavior

When a class is extending the binding of a template class with some type parameters getting no type arguments, the default values for those type parameters are not used and instead the type parameters are shown on the page of the class, which makes the class look generic while it isn't.

Example:

class TemplateClass<A = {}, B = any> {
}

class ConreteClass extends TemplateClass<string> {
}

Results in a typedoc page for ConreteClass where ConreteClass has a type parameter B, instead of it being derived from TemplateClass<string, any>.

Steps to reproduce the bug

Create the documentation for the code above.

Environment

  • Typedoc version: 0.17.8
  • TypeScript version: 3.9.6
  • Node.js version: 12.13.0
  • OS: Windows 10 (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions