How can typescript generate single one javascript file without reference typescript file code -
can typescript generate single 1 javascript file without reference typescript file code? here 2 typescript source files. class source1{...}; class source 2{...}; here 2 typescript files. ///reference path=’source1’ class reference1{...}; ///reference path=’source2’ class reference2{...}; i generate reference1 , reference2 single 1 js file. in js file, there source1 , source2 code. how can single javascript file without souce1 , soucre2 code? thanks. looks me need split compilation 2 phases, 1 generate soruce1 , soruce2, , 1 generate reference1 , reference2. best way generate .d.ts first batch of files reference in second compilation. to generate sources.d.ts: tsc --declaration --out soruces.js soruce1.ts source2.ts now files should like: ///reference path=’sources.d.ts’ class reference1{...}; ///reference path=’source.s.ts’ class reference2{...}; the second compilation be: tsc --out references.js reference1.ts reference2.ts