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

Accessors are not identified as an implementation of an interface property #1497

Closed
RunDevelopment opened this issue Feb 6, 2021 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@RunDevelopment
Copy link
Contributor

Search terms

Inherit, inheritance, implementation, properties, computed properties, accessors

Expected Behavior

Typedoc correctly identifies computed properties (accessors) as implementations of interface properties.

Example:

export interface Foo {
	/** Some documentation. */
	readonly bar: number;
	readonly barProp: number;
	barMethod(): number;
}
export class FooClass implements Foo {
	/** @inheritdoc */
	get bar(): number { return 4; }
	barProp = 9;
	barMethod(): number { return 42; }
}

All elements in FooClass should have a note saying that they implement some property of Foo.

Actual Behavior

This:

Screenshot of the page of `FooClass`

image

FooClass.bar does not have a little note saying: "Implementation of Foo.bar". This is the case with and without @inheritdoc.

Steps to reproduce the bug

Minimal project.

Environment

  • Typedoc version: 0.20.22
  • TypeScript version: 4.1.3
  • Node.js version: v14.15.4
  • OS: Win10 x64 Version 10.0.19042.746
@RunDevelopment RunDevelopment added the bug Functionality does not match expectation label Feb 6, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 6, 2021

Looks like TypeDoc did correctly mark the accessor with implementationOf, but not the getSignature and/or setSignature property, so when rendering it wasn't picked up.

@Gerrit0 Gerrit0 closed this as completed in ccd519a Feb 6, 2021
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