When creating JavaScript libraries using TypeScript v2.5 and tsc, it is important to include license comments in the built files. However, the removeComments
configuration in the tsconfig.json
file can remove certain comments, including license comments.
I have looked at a related post on Stack Overflow where suggestions such as using /** xxx */
or /*! xxx */
were made, but the comments still got removed. How can I ensure that specific comments are preserved in TypeScript even when using the removeComments
option? Or is this feature no longer available?
// Source
/** Hello! */
/* Hi */
class Foo { }
// Expected
/* Hello! */
class Foo { }
// Actual
class Foo { }