@@ -194,7 +194,7 @@ var compilerFilename = "tsc.js";
194
194
* @param keepComments: false to compile using --removeComments
195
195
* @param callback: a function to execute after the compilation process ends
196
196
*/
197
- function compileFile ( outFile , sources , prereqs , prefixes , useBuiltCompiler , noOutFile , generateDeclarations , outDir , preserveConstEnums , keepComments , noResolve , callback ) {
197
+ function compileFile ( outFile , sources , prereqs , prefixes , useBuiltCompiler , noOutFile , generateDeclarations , outDir , preserveConstEnums , keepComments , noResolve , stripInternal , callback ) {
198
198
file ( outFile , prereqs , function ( ) {
199
199
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory ;
200
200
var options = "--module commonjs -noImplicitAny" ;
@@ -227,6 +227,10 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
227
227
options += " -sourcemap -mapRoot file:///" + path . resolve ( path . dirname ( outFile ) ) ;
228
228
}
229
229
230
+ if ( stripInternal ) {
231
+ options += " --stripInternal"
232
+ }
233
+
230
234
var cmd = host + " " + dir + compilerFilename + " " + options + " " ;
231
235
cmd = cmd + sources . join ( " " ) ;
232
236
console . log ( cmd + "\n" ) ;
@@ -331,7 +335,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
331
335
/*outDir*/ undefined ,
332
336
/*preserveConstEnums*/ true ,
333
337
/*keepComments*/ false ,
334
- /*noResolve*/ false ) ;
338
+ /*noResolve*/ false ,
339
+ /*stripInternal*/ false ) ;
335
340
336
341
var nodeDefinitionsFile = path . join ( builtLocalDirectory , "typescript.d.ts" ) ;
337
342
var standaloneDefinitionsFile = path . join ( builtLocalDirectory , "typescriptServices.d.ts" ) ;
@@ -347,6 +352,7 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright
347
352
/*preserveConstEnums*/ true ,
348
353
/*keepComments*/ true ,
349
354
/*noResolve*/ true ,
355
+ /*stripInternal*/ true ,
350
356
/*callback*/ function ( ) {
351
357
function makeDefinitionFiles ( definitionsRoots , standaloneDefinitionsFile , nodeDefinitionsFile ) {
352
358
// Create the standalone definition file
0 commit comments