-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: primitive TypeScript support #7
feat: primitive TypeScript support #7
Conversation
It seems that for TypeScript files all For instance, this yields: class Foo {
/**
* this is method3.
* @param n - this is the param desc.
* @return this is the return desc.
* @private
*/
private method3(n: number): string {}
} But that would be an upstream issue with |
class Foo {
/**
* @desc this is method3.
* @param n - this is the param desc.
* @return this is the return desc.
* @private
*/
private method3(n: number): string {}
} However, this the breaks the type information. (The |
There also seems to be trouble with |
Any updates on this? We really need Typescript support for our documentation and it would be great if this addon could support it. Currently there seems to be no work around either. It would also be great if this addon could support custom ESDoc plugins. |
@buschtoens @tstormk do either of you know if enabling the TS plugin effects normal JS output from ESDoc at all? This looks fine to me, but I would like to double check we are not messing anything up for JS users. |
@@ -25,7 +26,8 @@ const ESDOC_CONFIG = { | |||
dynamicImport: true | |||
} | |||
}, | |||
{ name: 'esdoc-accessor-plugin' } | |||
{ name: 'esdoc-accessor-plugin' }, | |||
{ name: 'esdoc-typescript-plugin', option: { enable: true } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ name: 'esdoc-typescript-plugin', option: { enable: true } } | |
{ name: 'esdoc-typescript-plugin' } |
this enable
option is true
by default.
Can we cut a release with this improvement? I tested in a fairly large project which migrates some |
@nightire I mainly wanted to make sure it did not break plain JS. Does it work well for both vanilla JS and TS for you? |
@rwwagner90 Yes, it works well for both vanilla JavaScript and TypeScript. |
This PR enables primitive TypeScript support by:
.js
and.ts
filesesdoc-typescript-plugin
This solution is not perfect, but good enough to at least enable documenting TypeScript code, until
ember-cli-addon-docs-typedoc
is orember-cli-addon-docs-tsdoc
are a real thing.