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

Documentation of property-style methods isn't inherited #1624

Closed
RunDevelopment opened this issue Jul 8, 2021 · 1 comment
Closed

Documentation of property-style methods isn't inherited #1624

RunDevelopment opened this issue Jul 8, 2021 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@RunDevelopment
Copy link
Contributor

Search terms

property, inherit

Expected Behavior

The documentation of property-style methods in interfaces should be inherited in the same way that shorthand-syntax methods work.

export interface Bar {
	/** Some shorthand syntax doc. */
	bar(): number;
	/** Some property style doc. */
	baz: () => number;
}

export class Foo implements Bar {
	bar(): number {
		return 0;
	}
	baz(): number {
		return 0;
	}
}

Actual Behavior

The documentation is attributed to the function type instead of the property and therefore not inherited.

This broke going from version v0.20.37 to v0.21.0.

Result in v0.20.37

Doc of Bar:

image

Doc of Foo:

image

Result in v0.21.0

Doc of Bar:

image

Doc of Foo:

image

Steps to reproduce the bug

Here is a minimal repo reproducing the bug.

Just run npm ci && npm run docs to generate the docs folder.

Environment

  • Typedoc version: v0.21.x
  • TypeScript version: 4.2.4
  • Node.js version: v14.15.4
  • OS: Win10
@RunDevelopment RunDevelopment added the bug Functionality does not match expectation label Jul 8, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 10, 2021

I like your bugs :) Very helpful to have an tiny reproduction!

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