rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[api-extractor] Support doc comments for members of type aliases (#3002)

Open bdwain opened this issue 4 years ago • 4 comments
trafficstars

Summary

fixes #3002

export interface MyInterface {
  /** this is supported */
  str: string;
}

export type MyType = {
  /** this is not supported */
  str: string;
};

Currently, the above is only supported for interfaces. This adds support for type aliases as well, since they mostly interchangable https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#differences-between-type-aliases-and-interfaces

Details

I tried to reuse some of the functionality for interfaces when handling type aliases and things seemed to work.

How it was tested

I tested the above example as well as some non-object based type aliases to make sure they did not break

bdwain avatar Nov 03 '21 08:11 bdwain

CLA assistant check
All CLA requirements met.

ghost avatar Nov 03 '21 08:11 ghost

Hi. Any thoughts on this PR?

bdwain avatar Nov 18 '21 21:11 bdwain

@bdwain Thank you for contributing this PR! Sorry nobody has looked at it yet.

I agree that API Extractor should handle this situation, but the implementation is incomplete. Since it is a design question, I'll add my feedback to your original GitHub issue #3002.

octogonz avatar Jan 07 '22 00:01 octogonz

Note: PR #3337 has renamed our GitHub master branch to main. This should not affect your pull request, but we recommend to redo your git clone to avoid confusion with the old branch name.

iclanton avatar Apr 09 '22 02:04 iclanton