Skip to content

Commit abeb2a9

Browse files
author
Kanchalai Tanglertsampan
committed
Update baseline: emit prologue directives before anything else
1 parent 097bc77 commit abeb2a9

32 files changed

+32
-33
lines changed

tests/baselines/reference/APISample_compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ compile(process.argv.slice(2), {
3434
});
3535

3636
//// [APISample_compile.js]
37+
"use strict";
3738
/*
3839
* Note: This test is a public API sample. The sample sources can be found
3940
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
4041
* Please log a "breaking change" issue for any API breaking change affecting this issue
4142
*/
42-
"use strict";
4343
exports.__esModule = true;
4444
var ts = require("typescript");
4545
function compile(fileNames, options) {

tests/baselines/reference/APISample_linter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ fileNames.forEach(fileName => {
6464
});
6565

6666
//// [APISample_linter.js]
67+
"use strict";
6768
/*
6869
* Note: This test is a public API sample. The sample sources can be found
6970
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter
7071
* Please log a "breaking change" issue for any API breaking change affecting this issue
7172
*/
72-
"use strict";
7373
exports.__esModule = true;
7474
var ts = require("typescript");
7575
function delint(sourceFile) {

tests/baselines/reference/APISample_parseConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ export function createProgram(rootFiles: string[], compilerOptionsJson: string):
3636
}
3737

3838
//// [APISample_parseConfig.js]
39+
"use strict";
3940
/*
4041
* Note: This test is a public API sample. The sample sources can be found
4142
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-minimal-compiler
4243
* Please log a "breaking change" issue for any API breaking change affecting this issue
4344
*/
44-
"use strict";
4545
exports.__esModule = true;
4646
var ts = require("typescript");
4747
function printError(error) {

tests/baselines/reference/APISample_transform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ let result = ts.transpile(source, { module: ts.ModuleKind.CommonJS });
1616
console.log(JSON.stringify(result));
1717

1818
//// [APISample_transform.js]
19+
"use strict";
1920
/*
2021
* Note: This test is a public API sample. The sample sources can be found
2122
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#a-simple-transform-function
2223
* Please log a "breaking change" issue for any API breaking change affecting this issue
2324
*/
24-
"use strict";
2525
exports.__esModule = true;
2626
var ts = require("typescript");
2727
var source = "let x: string = 'string'";

tests/baselines/reference/APISample_watcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ const currentDirectoryFiles = fs.readdirSync(process.cwd()).
109109
watch(currentDirectoryFiles, { module: ts.ModuleKind.CommonJS });
110110

111111
//// [APISample_watcher.js]
112+
"use strict";
112113
/*
113114
* Note: This test is a public API sample. The sample sources can be found
114115
at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#incremental-build-support-using-the-language-services
115116
* Please log a "breaking change" issue for any API breaking change affecting this issue
116117
*/
117-
"use strict";
118118
exports.__esModule = true;
119119
var ts = require("typescript");
120120
function watch(rootFileNames, options) {

tests/baselines/reference/alwaysStrictModule2.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ var M;
2323
}
2424
M.f = f;
2525
})(M || (M = {}));
26-
"use strict";
2726
var M;
2827
(function (M) {
2928
function f2() {

tests/baselines/reference/amdDependencyComment1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import m1 = require("m2")
55
m1.f();
66

77
//// [amdDependencyComment1.js]
8-
///<amd-dependency path='bar'/>
98
"use strict";
9+
///<amd-dependency path='bar'/>
1010
exports.__esModule = true;
1111
var m1 = require("m2");
1212
m1.f();

tests/baselines/reference/amdDependencyCommentName1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import m1 = require("m2")
55
m1.f();
66

77
//// [amdDependencyCommentName1.js]
8-
///<amd-dependency path='bar' name='b'/>
98
"use strict";
9+
///<amd-dependency path='bar' name='b'/>
1010
exports.__esModule = true;
1111
var m1 = require("m2");
1212
m1.f();

tests/baselines/reference/commentOnImportStatement3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
import foo = require('./foo');
66

77
//// [commentOnImportStatement3.js]
8-
/* copyright */
98
"use strict";
9+
/* copyright */
1010
exports.__esModule = true;

tests/baselines/reference/complexNarrowingWithAny.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ export function viewFactory_AppComponent0(viewUtils:any,parentInjector:any,decla
560560

561561

562562
//// [complexNarrowingWithAny.js]
563-
// Repro from #10869
564563
"use strict";
564+
// Repro from #10869
565565
exports.__esModule = true;
566566
/**
567567
* This file is generated by the Angular 2 template compiler.

0 commit comments

Comments
 (0)