author linhuiw
 *  desc import * as ts from 'typescript' ; param code param fileName export function removeFileComment ( code , fileName ) { const printer = ts . createPrinter ( { removeComments : true } ) ; const sourceFile = ts . createSourceFile ( '' , code , ts . ScriptTarget . ES2015 , true , fileName . endsWith ( '.tsx' ) ? ts . ScriptKind . TSX : ts . ScriptKind . TS ) ; return printer . printFile ( sourceFile ) ; }