TypeScript compile and keep comments

joeriks picture joeriks · Oct 6, 2012 · Viewed 10.9k times · Source

I like to have my comments intact in the resulting javascript file, by default the compiler removes them. Is there a tsc parameter for that? (The use case is to keep /// reference path's = ... for chutzpah unit testing. )

Answer

amin picture amin · May 5, 2015

Comments that start with /*! are preserved.

example:
/*! this comment remains untouched */
/* but this one will be removed */