Merge pull request #7925 from Microsoft/correctStrictPrologueCheckToTransforms

Correct strict prologue check to transforms
This commit is contained in:
Daniel Rosenwasser
2016-04-07 12:37:42 -07:00
6 changed files with 41 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
//// [useStrictLikePrologueString01.ts]
"hey!"
" use strict "
export function f() {
}
//// [useStrictLikePrologueString01.js]
"hey!";
" use strict ";
"use strict";
function f() {
}
exports.f = f;

View File

@@ -0,0 +1,7 @@
=== tests/cases/compiler/useStrictLikePrologueString01.ts ===
"hey!"
" use strict "
export function f() {
>f : Symbol(f, Decl(useStrictLikePrologueString01.ts, 2, 14))
}

View File

@@ -0,0 +1,11 @@
=== tests/cases/compiler/useStrictLikePrologueString01.ts ===
"hey!"
>"hey!" : string
" use strict "
>" use strict " : string
export function f() {
>f : () => void
}

View File

@@ -0,0 +1,7 @@
//@target: commonjs
//@target: es5
"hey!"
" use strict "
export function f() {
}