Can TypeScript output javadoc comments?

Since TypeScript does not support minimization or obfuscation, both of which are functions that we need, we still need a tool like the Google Closure compiler in our tool chain. Is there anyway to get TypeScript to output javadoc comments automatically so that Closure can just become an automatic step?

Without this, it seems that these tools are largely incompatible because we need javadoc comments, which means that we cannot use TypeScript. It seems like this would be an easy opportunity to add as you know all types.

Thanks,

Jason

+4
source share
2 answers

TypeScript does not contain documentation or additional comments; you can save comments (jsDoc or any other format) in TypeScript files for emitted JavaScript by passing -c or (-comments) to the compiler.

+2
source

Micheal Bolin posted how he hacked it: Creating Google Closure JavaScript from TypeScript .

Because IntellJ IDEA now understands (though not completely) Closure Jsdoc, TypeScript is no longer required for the IDE.

0
source

Source: https://habr.com/ru/post/1437469/


All Articles