Skip to content

Add JSDocs style commenting to exported "types" #1358

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

Closed
jplante opened this issue Aug 25, 2020 · 2 comments
Closed

Add JSDocs style commenting to exported "types" #1358

jplante opened this issue Aug 25, 2020 · 2 comments
Labels
wontfix Declining to implement

Comments

@jplante
Copy link

jplante commented Aug 25, 2020

Ideally it would be great if the TypeDocs JSON output could provide "type" spefici information about exported/declared types.

For example:

export type VectorAlias = 
  | Vector 
  | { direction: number, magnitude: number } 
  | [ direction: number, magnitude: number ]
;

Could become:

export type VectorAlias = 
 /**
  * description blah blah blah
  */   
  | Vector 

 /**
  * description blah blah blah
  */   
  | { direction: number, magnitude: number } 

 /**
  * description blah blah blah
  */   
  | [ direction: number, magnitude: number ]
;
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 28, 2020

This is... tricky. Where does this end?

type Something =
  /** 1 */
  | A
  | { /** 2 */ b: 2 }
  | { c: /** 3 */ 3 }
  | { d: [/** 4 */ 4 | 5] }

@Gerrit0 Gerrit0 added the wontfix Declining to implement label Nov 1, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 1, 2020

I'm going to go ahead and mark this as wontfix - I do plan on adding support for "union enums", but that's a very specific case. I haven't been able to figure out a nice way to generically handle comments everywhere microsoft/tsdoc#164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Declining to implement
Projects
None yet
Development

No branches or pull requests

2 participants