mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-11 10:46:28 -05:00
Merge branch '10758-always-strict' of https://github.com/slawomir/TypeScript into slawomir-10758-always-strict
This commit is contained in:
10
tests/baselines/reference/alwaysStrict.errors.txt
Normal file
10
tests/baselines/reference/alwaysStrict.errors.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/alwaysStrict.ts(3,9): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/alwaysStrict.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments = [];
|
||||
~~~~~~~~~
|
||||
!!! error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
}
|
||||
11
tests/baselines/reference/alwaysStrict.js
Normal file
11
tests/baselines/reference/alwaysStrict.js
Normal file
@@ -0,0 +1,11 @@
|
||||
//// [alwaysStrict.ts]
|
||||
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
|
||||
//// [alwaysStrict.js]
|
||||
"use strict";
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
11
tests/baselines/reference/alwaysStrictAlreadyUseStrict.js
Normal file
11
tests/baselines/reference/alwaysStrictAlreadyUseStrict.js
Normal file
@@ -0,0 +1,11 @@
|
||||
//// [alwaysStrictAlreadyUseStrict.ts]
|
||||
"use strict"
|
||||
function f() {
|
||||
var a = [];
|
||||
}
|
||||
|
||||
//// [alwaysStrictAlreadyUseStrict.js]
|
||||
"use strict";
|
||||
function f() {
|
||||
var a = [];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
=== tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts ===
|
||||
"use strict"
|
||||
function f() {
|
||||
>f : Symbol(f, Decl(alwaysStrictAlreadyUseStrict.ts, 0, 12))
|
||||
|
||||
var a = [];
|
||||
>a : Symbol(a, Decl(alwaysStrictAlreadyUseStrict.ts, 2, 7))
|
||||
}
|
||||
11
tests/baselines/reference/alwaysStrictAlreadyUseStrict.types
Normal file
11
tests/baselines/reference/alwaysStrictAlreadyUseStrict.types
Normal file
@@ -0,0 +1,11 @@
|
||||
=== tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts ===
|
||||
"use strict"
|
||||
>"use strict" : "use strict"
|
||||
|
||||
function f() {
|
||||
>f : () => void
|
||||
|
||||
var a = [];
|
||||
>a : any[]
|
||||
>[] : undefined[]
|
||||
}
|
||||
10
tests/baselines/reference/alwaysStrictES6.errors.txt
Normal file
10
tests/baselines/reference/alwaysStrictES6.errors.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
tests/cases/compiler/alwaysStrictES6.ts(3,9): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/alwaysStrictES6.ts (1 errors) ====
|
||||
|
||||
function f() {
|
||||
var arguments = [];
|
||||
~~~~~~~~~
|
||||
!!! error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
}
|
||||
11
tests/baselines/reference/alwaysStrictES6.js
Normal file
11
tests/baselines/reference/alwaysStrictES6.js
Normal file
@@ -0,0 +1,11 @@
|
||||
//// [alwaysStrictES6.ts]
|
||||
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
|
||||
//// [alwaysStrictES6.js]
|
||||
"use strict";
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
12
tests/baselines/reference/alwaysStrictModule.errors.txt
Normal file
12
tests/baselines/reference/alwaysStrictModule.errors.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
tests/cases/compiler/alwaysStrictModule.ts(4,13): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/alwaysStrictModule.ts (1 errors) ====
|
||||
|
||||
module M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
~~~~~~~~~
|
||||
!!! error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
}
|
||||
}
|
||||
17
tests/baselines/reference/alwaysStrictModule.js
Normal file
17
tests/baselines/reference/alwaysStrictModule.js
Normal file
@@ -0,0 +1,17 @@
|
||||
//// [alwaysStrictModule.ts]
|
||||
|
||||
module M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
}
|
||||
|
||||
//// [alwaysStrictModule.js]
|
||||
"use strict";
|
||||
var M;
|
||||
(function (M) {
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
M.f = f;
|
||||
})(M || (M = {}));
|
||||
@@ -0,0 +1,12 @@
|
||||
tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts(4,13): error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts (1 errors) ====
|
||||
|
||||
module M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
~~~~~~~~~
|
||||
!!! error TS1100: Invalid use of 'arguments' in strict mode.
|
||||
}
|
||||
}
|
||||
17
tests/baselines/reference/alwaysStrictNoImplicitUseStrict.js
Normal file
17
tests/baselines/reference/alwaysStrictNoImplicitUseStrict.js
Normal file
@@ -0,0 +1,17 @@
|
||||
//// [alwaysStrictNoImplicitUseStrict.ts]
|
||||
|
||||
module M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
}
|
||||
|
||||
//// [alwaysStrictNoImplicitUseStrict.js]
|
||||
"use strict";
|
||||
var M;
|
||||
(function (M) {
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
M.f = f;
|
||||
})(M || (M = {}));
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
x;
|
||||
//# sourceMappingURL=input.js.map
|
||||
5
tests/cases/compiler/alwaysStrict.ts
Normal file
5
tests/cases/compiler/alwaysStrict.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @alwaysStrict: true
|
||||
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
5
tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts
Normal file
5
tests/cases/compiler/alwaysStrictAlreadyUseStrict.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// @alwaysStrict: true
|
||||
"use strict"
|
||||
function f() {
|
||||
var a = [];
|
||||
}
|
||||
6
tests/cases/compiler/alwaysStrictES6.ts
Normal file
6
tests/cases/compiler/alwaysStrictES6.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
// @target: ES6
|
||||
// @alwaysStrict: true
|
||||
|
||||
function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
8
tests/cases/compiler/alwaysStrictModule.ts
Normal file
8
tests/cases/compiler/alwaysStrictModule.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module: commonjs
|
||||
// @alwaysStrict: true
|
||||
|
||||
module M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
}
|
||||
9
tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts
Normal file
9
tests/cases/compiler/alwaysStrictNoImplicitUseStrict.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// @module: commonjs
|
||||
// @alwaysStrict: true
|
||||
// @noImplicitUseStrict: true
|
||||
|
||||
module M {
|
||||
export function f() {
|
||||
var arguments = [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user