Skip to content

Commit 1b6f0ea

Browse files
committed
Fix API Sample tests
1 parent bcd6919 commit 1b6f0ea

28 files changed

+173
-1809
lines changed

Jakefile.js

-6
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ compileOutputConfigFile('src/typescriptServices/tsconfig.json', [], [copyright],
139139
// Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module
140140
var nodeDefinitionsFileContents = definitionFileContents + "\nexport = ts;";
141141
fs.writeFileSync(nodeDefinitionsFile, nodeDefinitionsFileContents);
142-
143-
// Node package definition file to be distributed without the package. Created by replacing
144-
// 'ts' namespace with '"typescript"' as a module.
145-
var nodeStandaloneDefinitionsFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
146-
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
147142
});
148143
compileOutputConfigFile('src/core/tsconfig.json');
149144
compileOutputConfigFile('src/harness/tsconfig.json');
@@ -584,7 +579,6 @@ var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
584579
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
585580
var nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
586581
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
587-
var nodeStandaloneDefinitionsFile = path.join(builtLocalDirectory, "typescript_standalone.d.ts");
588582
var tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js");
589583
var tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts");
590584

tests/baselines/reference/APISample_Watch.errors.txt

-208
This file was deleted.

tests/baselines/reference/APISample_Watch.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
//// [tests/cases/compiler/APISample_Watch.ts] ////
2+
3+
//// [index.d.ts]
4+
declare module "typescript" {
5+
export = ts;
6+
}
7+
18
//// [APISample_Watch.ts]
29
/*
310
* Note: This test is a public API sample. The sample sources can be found
4-
at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
11+
* at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
512
* Please log a "breaking change" issue for any API breaking change affecting this issue
613
*/
714

@@ -79,7 +86,7 @@ watchMain();
7986
"use strict";
8087
/*
8188
* Note: This test is a public API sample. The sample sources can be found
82-
at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
89+
* at: https://github.com/Microsoft/TypeScript-wiki/blob/master/Using-the-Compiler-API.md#writing-an-incremental-program-watcher
8390
* Please log a "breaking change" issue for any API breaking change affecting this issue
8491
*/
8592
exports.__esModule = true;

0 commit comments

Comments
 (0)