Skip to content

Commit b14b24a

Browse files
committed
Update tests
1 parent dda8aac commit b14b24a

21 files changed

+37
-38
lines changed

tests/cases/compiler/anyPlusAny1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
var x;
1+
var x: any;
22
x.name = "hello";
33
var z = x + x;

tests/cases/compiler/es5-asyncFunctionTryStatements.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// @lib: es5,es2015.promise
22
// @noEmitHelpers: true
33
// @target: ES5
4-
declare var x, y, z, a, b, c;
4+
declare var x: any, y: any, z: any, a: any, b: any, c: any;
55

66
async function tryCatch0() {
7-
var x, y;
7+
var x: any, y: any;
88
try {
99
x;
1010
}
@@ -14,7 +14,7 @@ async function tryCatch0() {
1414
}
1515

1616
async function tryCatch1() {
17-
var x, y;
17+
var x: any, y: any;
1818
try {
1919
await x;
2020
}
@@ -24,7 +24,7 @@ async function tryCatch1() {
2424
}
2525

2626
async function tryCatch2() {
27-
var x, y;
27+
var x: any, y: any;
2828
try {
2929
x;
3030
}
@@ -34,7 +34,7 @@ async function tryCatch2() {
3434
}
3535

3636
async function tryCatch3(): Promise<Function> {
37-
var x, y;
37+
var x: any, y: any;
3838
try {
3939
await x;
4040
}
@@ -43,7 +43,7 @@ async function tryCatch3(): Promise<Function> {
4343
}
4444
}
4545
async function tryFinally0() {
46-
var x, y;
46+
var x: any, y: any;
4747
try {
4848
x;
4949
}
@@ -53,7 +53,7 @@ async function tryFinally0() {
5353
}
5454

5555
async function tryFinally1() {
56-
var x, y;
56+
var x: any, y: any;
5757
try {
5858
await x;
5959
}
@@ -63,7 +63,7 @@ async function tryFinally1() {
6363
}
6464

6565
async function tryFinally2() {
66-
var x, y;
66+
var x: any, y: any;
6767
try {
6868
x;
6969
}
@@ -73,7 +73,7 @@ async function tryFinally2() {
7373
}
7474

7575
async function tryCatchFinally0() {
76-
var x, y, z;
76+
var x: any, y: any, z: any;
7777
try {
7878
x;
7979
}
@@ -86,7 +86,7 @@ async function tryCatchFinally0() {
8686
}
8787

8888
async function tryCatchFinally1() {
89-
var x, y, z;
89+
var x: any, y: any, z: any;
9090
try {
9191
await x;
9292
}
@@ -99,7 +99,7 @@ async function tryCatchFinally1() {
9999
}
100100

101101
async function tryCatchFinally2() {
102-
var x, y, z;
102+
var x: any, y: any, z: any;
103103
try {
104104
x;
105105
}
@@ -112,7 +112,7 @@ async function tryCatchFinally2() {
112112
}
113113

114114
async function tryCatchFinally3() {
115-
var x, y, z;
115+
var x: any, y: any, z: any;
116116
try {
117117
x;
118118
}

tests/cases/compiler/expr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ enum E {
66
}
77

88
function f() {
9-
var a;
9+
var a: any;
1010
var n=3;
1111
var s="";
1212
var b=false;

tests/cases/compiler/implicitAnyDeclareVariablesWithoutTypeAndInit.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @noimplicitany: true
22
// this should be an error
3-
var x; // error at "x"
4-
declare var foo; // error at "foo"
5-
function func(k) { }; //error at "k"
3+
var x; // no error, control flow typed
4+
var y; // error because captured
5+
declare var foo; // error at "foo"
6+
function func(k) { y }; // error at "k"
67
func(x);
78

89
// this shouldn't be an error

tests/cases/conformance/Symbols/ES5SymbolProperty2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@target: ES5
22
module M {
3-
var Symbol;
3+
var Symbol: any;
44

55
export class C {
66
[Symbol.iterator]() { }

tests/cases/conformance/Symbols/ES5SymbolProperty3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@target: ES5
2-
var Symbol;
2+
var Symbol: any;
33

44
class C {
55
[Symbol.iterator]() { }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//@target: ES6
2-
var v;
2+
var v: any;
33
for (v++ of []) { }

tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var value;
1+
var value: any;
22

33
// identifiers: variable and parameter
44
var x1: number;

tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// expected error for all the LHS of compound assignments (arithmetic and addition)
2-
var value;
2+
var value: any;
33

44
// this
55
class C {

tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @target: es5
22

33
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
4-
var temp;
4+
var temp: any;
55

66
delete --temp ** 3;
77
delete ++temp ** 3;

0 commit comments

Comments
 (0)