diff --git a/Jakefile b/Jakefile index f663e162a16..767387c5d86 100644 --- a/Jakefile +++ b/Jakefile @@ -194,7 +194,7 @@ var compilerFilename = "tsc.js"; * @param keepComments: false to compile using --removeComments * @param callback: a function to execute after the compilation process ends */ -function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, callback) { +function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile, generateDeclarations, outDir, preserveConstEnums, keepComments, noResolve, stripInternal, callback) { file(outFile, prereqs, function() { var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory; var options = "--module commonjs -noImplicitAny"; @@ -227,6 +227,10 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu options += " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile)); } + if (stripInternal) { + options += " --stripInternal" + } + var cmd = host + " " + dir + compilerFilename + " " + options + " "; cmd = cmd + sources.join(" "); console.log(cmd + "\n"); @@ -331,7 +335,8 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca /*outDir*/ undefined, /*preserveConstEnums*/ true, /*keepComments*/ false, - /*noResolve*/ false); + /*noResolve*/ false, + /*stripInternal*/ false); var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts"); var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts"); @@ -347,6 +352,7 @@ compileFile(nodeDefinitionsFile, servicesSources,[builtLocalDirectory, copyright /*preserveConstEnums*/ true, /*keepComments*/ true, /*noResolve*/ true, + /*stripInternal*/ true, /*callback*/ function () { function makeDefinitionFiles(definitionsRoots, standaloneDefinitionsFile, nodeDefinitionsFile) { // Create the standalone definition file diff --git a/src/compiler/types.ts b/src/compiler/types.ts index eb68bab7b74..a6fb7cdf7ef 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -891,22 +891,6 @@ module ts { amdModuleName: string; referencedFiles: FileReference[]; - // Diagnostics reported about the "///; + // @internal + // Diagnostics reported about the "///; - lineMap: number[]; } interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index 6a057658f5a..064170cd70f 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -2219,22 +2219,6 @@ declare module "typescript" { >referencedFiles : FileReference[] >FileReference : FileReference - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - syntacticDiagnostics: Diagnostic[]; ->syntacticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - hasNoDefaultLib: boolean; >hasNoDefaultLib : boolean @@ -2258,9 +2242,6 @@ declare module "typescript" { identifiers: Map; >identifiers : Map >Map : Map - - lineMap: number[]; ->lineMap : number[] } interface ScriptReferenceHost { >ScriptReferenceHost : ScriptReferenceHost diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 5fd4716b8e9..aa12cb40cb3 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -757,10 +757,6 @@ declare module "typescript" { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - syntacticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -768,7 +764,6 @@ declare module "typescript" { symbolCount: number; languageVersion: ScriptTarget; identifiers: Map; - lineMap: number[]; } interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index ffbe61d41a5..7065704f422 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -2349,22 +2349,6 @@ declare module "typescript" { >referencedFiles : FileReference[] >FileReference : FileReference - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - syntacticDiagnostics: Diagnostic[]; ->syntacticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - hasNoDefaultLib: boolean; >hasNoDefaultLib : boolean @@ -2388,9 +2372,6 @@ declare module "typescript" { identifiers: Map; >identifiers : Map >Map : Map - - lineMap: number[]; ->lineMap : number[] } interface ScriptReferenceHost { >ScriptReferenceHost : ScriptReferenceHost diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 6b5828ccb4a..58535e42601 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -758,10 +758,6 @@ declare module "typescript" { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - syntacticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -769,7 +765,6 @@ declare module "typescript" { symbolCount: number; languageVersion: ScriptTarget; identifiers: Map; - lineMap: number[]; } interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 293927b9ea9..5d90818f635 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -2297,22 +2297,6 @@ declare module "typescript" { >referencedFiles : FileReference[] >FileReference : FileReference - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - syntacticDiagnostics: Diagnostic[]; ->syntacticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - hasNoDefaultLib: boolean; >hasNoDefaultLib : boolean @@ -2336,9 +2320,6 @@ declare module "typescript" { identifiers: Map; >identifiers : Map >Map : Map - - lineMap: number[]; ->lineMap : number[] } interface ScriptReferenceHost { >ScriptReferenceHost : ScriptReferenceHost diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index c2cf2c89033..cd8b44bfe2d 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -795,10 +795,6 @@ declare module "typescript" { amdDependencies: string[]; amdModuleName: string; referencedFiles: FileReference[]; - referenceDiagnostics: Diagnostic[]; - parseDiagnostics: Diagnostic[]; - semanticDiagnostics: Diagnostic[]; - syntacticDiagnostics: Diagnostic[]; hasNoDefaultLib: boolean; externalModuleIndicator: Node; nodeCount: number; @@ -806,7 +802,6 @@ declare module "typescript" { symbolCount: number; languageVersion: ScriptTarget; identifiers: Map; - lineMap: number[]; } interface ScriptReferenceHost { getCompilerOptions(): CompilerOptions; diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index d9135591898..7050f0497d9 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -2475,22 +2475,6 @@ declare module "typescript" { >referencedFiles : FileReference[] >FileReference : FileReference - referenceDiagnostics: Diagnostic[]; ->referenceDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - parseDiagnostics: Diagnostic[]; ->parseDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - semanticDiagnostics: Diagnostic[]; ->semanticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - syntacticDiagnostics: Diagnostic[]; ->syntacticDiagnostics : Diagnostic[] ->Diagnostic : Diagnostic - hasNoDefaultLib: boolean; >hasNoDefaultLib : boolean @@ -2514,9 +2498,6 @@ declare module "typescript" { identifiers: Map; >identifiers : Map >Map : Map - - lineMap: number[]; ->lineMap : number[] } interface ScriptReferenceHost { >ScriptReferenceHost : ScriptReferenceHost diff --git a/tests/cases/compiler/APISample_compile.ts b/tests/cases/compiler/APISample_compile.ts index d2ad7853a19..004e22dcb0c 100644 --- a/tests/cases/compiler/APISample_compile.ts +++ b/tests/cases/compiler/APISample_compile.ts @@ -1,5 +1,6 @@ // @module: commonjs // @includebuiltfile: typescript.d.ts +// @stripInternal:true /* * Note: This test is a public API sample. The sample sources can be found diff --git a/tests/cases/compiler/APISample_linter.ts b/tests/cases/compiler/APISample_linter.ts index 8a796fe6fc8..1942923a81d 100644 --- a/tests/cases/compiler/APISample_linter.ts +++ b/tests/cases/compiler/APISample_linter.ts @@ -1,5 +1,6 @@ // @module: commonjs // @includebuiltfile: typescript.d.ts +// @stripInternal:true /* * Note: This test is a public API sample. The sample sources can be found diff --git a/tests/cases/compiler/APISample_transform.ts b/tests/cases/compiler/APISample_transform.ts index 4d79ff827cd..b0a6c7d37ea 100644 --- a/tests/cases/compiler/APISample_transform.ts +++ b/tests/cases/compiler/APISample_transform.ts @@ -1,5 +1,6 @@ // @module: commonjs // @includebuiltfile: typescript.d.ts +// @stripInternal:true /* * Note: This test is a public API sample. The sample sources can be found diff --git a/tests/cases/compiler/APISample_watcher.ts b/tests/cases/compiler/APISample_watcher.ts index 119c66697b2..3c65b59801d 100644 --- a/tests/cases/compiler/APISample_watcher.ts +++ b/tests/cases/compiler/APISample_watcher.ts @@ -1,5 +1,6 @@ // @module: commonjs // @includebuiltfile: typescript.d.ts +// @stripInternal:true /* * Note: This test is a public API sample. The sample sources can be found