Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Since v0.20: Type arguments are not used when extending a template class implementation #1438

Closed
krisztianb opened this issue Dec 30, 2020 · 3 comments
Labels
bug Functionality does not match expectation

Comments

@krisztianb
Copy link
Contributor

krisztianb commented Dec 30, 2020

Search terms

template class, type arguments, type parameters, inheritance, extends

Expected Behavior

When a class is extending a template class implementation (using type arguments) the type arguments should be used as types in the sub class.

Actual Behavior

The sub class is rendered by TypeDoc with the type parameters instead of the type arguments. This was working fine back in version 0.19.2.

Steps to reproduce the bug

Example module:

export class TemplateTester<A, B = number> {
    public aaa: A;
    public bbb: B;
    public aOrb: A | B;
    public unionAB: string | A | Readonly<A | B>

    public BaseMethod(param1: A, param2: B): void {}
    public StaticMethodWithTypeParameters<A, B>(p1: A, p2: B): void {}
}

export class TemplateTesterSubClass2 extends TemplateTester<number> {
}

Environment

  • Typedoc version: 0.20.5
  • TypeScript version: 4.1.3
  • Node.js version: 12.13.0
  • OS: Windows 10
@krisztianb krisztianb added the bug Functionality does not match expectation label Dec 30, 2020
@Gerrit0 Gerrit0 closed this as completed in 60b6506 Jan 1, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 1, 2021

Shoot... I thought I'd fixed this, I guess the fix only worked for methods. Fixed in 0.20.6, publishing shortly

@krisztianb
Copy link
Contributor Author

Thanks for the quick fix. I'll check it out soon.

@krisztianb
Copy link
Contributor Author

Looks better now. 👍 I still found a difference and created a new issue #1441 for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants