Skip to content

Type parameters of template classes should not be inherited #1345

@krisztianb

Description

@krisztianb

Search terms

type-parameters, React.Component

Expected Behavior

When a class is extending a binding of the template class React.Component there should be no type parameters visible, because the extending class is not generic, but its base class is. Moreover the type parameters are: P, S and SS.

Example code:

class AlarmGrid extends React.Component<PropsFromRedux> {
  // *snip*
}

Actual Behavior

When a class is extending a binding of the template class React.Component the following type parameters are shown: S, SS and S. Which means that P is missing and S is displayed twice. But there should be none at all, as described above.

typedoc screenshot

This was originally reported by by @Kerry-Cho on Gitter here.

Steps to reproduce the bug

  1. Create a simple project
  2. Do npm install react and npm install --save-dev @types/react
  3. Create a class extending React.Component (see example code above)
  4. Create the documentation using typedoc

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