Skip to content

Commit b0576cd

Browse files
Accepted baselines.
1 parent 5ab5cfd commit b0576cd

10 files changed

Lines changed: 46 additions & 30 deletions

tests/baselines/reference/contextuallyTypeCommaOperator01.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//// [contextuallyTypeCommaOperator01.ts]
2+
23
let x: (a: string) => string;
34

45
x = (100, a => a);
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
=== tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator01.ts ===
2+
23
let x: (a: string) => string;
3-
>x : Symbol(x, Decl(contextuallyTypeCommaOperator01.ts, 0, 3))
4-
>a : Symbol(a, Decl(contextuallyTypeCommaOperator01.ts, 0, 8))
4+
>x : Symbol(x, Decl(contextuallyTypeCommaOperator01.ts, 1, 3))
5+
>a : Symbol(a, Decl(contextuallyTypeCommaOperator01.ts, 1, 8))
56

67
x = (100, a => a);
7-
>x : Symbol(x, Decl(contextuallyTypeCommaOperator01.ts, 0, 3))
8-
>a : Symbol(a, Decl(contextuallyTypeCommaOperator01.ts, 2, 9))
9-
>a : Symbol(a, Decl(contextuallyTypeCommaOperator01.ts, 2, 9))
8+
>x : Symbol(x, Decl(contextuallyTypeCommaOperator01.ts, 1, 3))
9+
>a : Symbol(a, Decl(contextuallyTypeCommaOperator01.ts, 3, 9))
10+
>a : Symbol(a, Decl(contextuallyTypeCommaOperator01.ts, 3, 9))
1011

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
=== tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator01.ts ===
2+
23
let x: (a: string) => string;
34
>x : (a: string) => string
45
>a : string
56

67
x = (100, a => a);
7-
>x = (100, a => a) : (a: any) => any
8+
>x = (100, a => a) : (a: string) => string
89
>x : (a: string) => string
9-
>(100, a => a) : (a: any) => any
10-
>100, a => a : (a: any) => any
10+
>(100, a => a) : (a: string) => string
11+
>100, a => a : (a: string) => string
1112
>100 : number
12-
>a => a : (a: any) => any
13-
>a : any
14-
>a : any
13+
>a => a : (a: string) => string
14+
>a : string
15+
>a : string
1516

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts(3,1): error TS2322: Type '(a: any) => number' is not assignable to type '(a: string) => string'.
1+
tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts(4,1): error TS2322: Type '(a: string) => number' is not assignable to type '(a: string) => string'.
22
Type 'number' is not assignable to type 'string'.
3+
tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts(5,11): error TS2322: Type 'string' is not assignable to type 'number'.
34

45

5-
==== tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts (1 errors) ====
6+
==== tests/cases/conformance/types/contextualTypes/commaOperator/contextuallyTypeCommaOperator02.ts (2 errors) ====
7+
68
let x: (a: string) => string;
79

810
x = (100, a => {
911
~
10-
!!! error TS2322: Type '(a: any) => number' is not assignable to type '(a: string) => string'.
12+
!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: string) => string'.
1113
!!! error TS2322: Type 'number' is not assignable to type 'string'.
1214
const b: number = a;
15+
~
16+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
1317
return b;
1418
});

tests/baselines/reference/contextuallyTypeCommaOperator02.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//// [contextuallyTypeCommaOperator02.ts]
2+
23
let x: (a: string) => string;
34

45
x = (100, a => {

tests/baselines/reference/contextuallyTypeLogicalAnd01.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//// [contextuallyTypeLogicalAnd01.ts]
2+
23
let x: (a: string) => string;
34
let y = true;
45

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
=== tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd01.ts ===
2+
23
let x: (a: string) => string;
3-
>x : Symbol(x, Decl(contextuallyTypeLogicalAnd01.ts, 0, 3))
4-
>a : Symbol(a, Decl(contextuallyTypeLogicalAnd01.ts, 0, 8))
4+
>x : Symbol(x, Decl(contextuallyTypeLogicalAnd01.ts, 1, 3))
5+
>a : Symbol(a, Decl(contextuallyTypeLogicalAnd01.ts, 1, 8))
56

67
let y = true;
7-
>y : Symbol(y, Decl(contextuallyTypeLogicalAnd01.ts, 1, 3))
8+
>y : Symbol(y, Decl(contextuallyTypeLogicalAnd01.ts, 2, 3))
89

910
x = y && (a => a);
10-
>x : Symbol(x, Decl(contextuallyTypeLogicalAnd01.ts, 0, 3))
11-
>y : Symbol(y, Decl(contextuallyTypeLogicalAnd01.ts, 1, 3))
12-
>a : Symbol(a, Decl(contextuallyTypeLogicalAnd01.ts, 3, 10))
13-
>a : Symbol(a, Decl(contextuallyTypeLogicalAnd01.ts, 3, 10))
11+
>x : Symbol(x, Decl(contextuallyTypeLogicalAnd01.ts, 1, 3))
12+
>y : Symbol(y, Decl(contextuallyTypeLogicalAnd01.ts, 2, 3))
13+
>a : Symbol(a, Decl(contextuallyTypeLogicalAnd01.ts, 4, 10))
14+
>a : Symbol(a, Decl(contextuallyTypeLogicalAnd01.ts, 4, 10))
1415

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
=== tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd01.ts ===
2+
23
let x: (a: string) => string;
34
>x : (a: string) => string
45
>a : string
@@ -8,12 +9,12 @@ let y = true;
89
>true : boolean
910

1011
x = y && (a => a);
11-
>x = y && (a => a) : (a: any) => any
12+
>x = y && (a => a) : (a: string) => string
1213
>x : (a: string) => string
13-
>y && (a => a) : (a: any) => any
14+
>y && (a => a) : (a: string) => string
1415
>y : boolean
15-
>(a => a) : (a: any) => any
16-
>a => a : (a: any) => any
17-
>a : any
18-
>a : any
16+
>(a => a) : (a: string) => string
17+
>a => a : (a: string) => string
18+
>a : string
19+
>a : string
1920

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts(4,1): error TS2322: Type '(a: any) => number' is not assignable to type '(a: string) => string'.
1+
tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts(5,1): error TS2322: Type '(a: string) => number' is not assignable to type '(a: string) => string'.
22
Type 'number' is not assignable to type 'string'.
3+
tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts(6,11): error TS2322: Type 'string' is not assignable to type 'number'.
34

45

5-
==== tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts (1 errors) ====
6+
==== tests/cases/conformance/types/contextualTypes/logicalAnd/contextuallyTypeLogicalAnd02.ts (2 errors) ====
7+
68
let x: (a: string) => string;
79
let y = true;
810

911
x = y && (a => {
1012
~
11-
!!! error TS2322: Type '(a: any) => number' is not assignable to type '(a: string) => string'.
13+
!!! error TS2322: Type '(a: string) => number' is not assignable to type '(a: string) => string'.
1214
!!! error TS2322: Type 'number' is not assignable to type 'string'.
1315
const b: number = a;
16+
~
17+
!!! error TS2322: Type 'string' is not assignable to type 'number'.
1418
return b;
1519
});

tests/baselines/reference/contextuallyTypeLogicalAnd02.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//// [contextuallyTypeLogicalAnd02.ts]
2+
23
let x: (a: string) => string;
34
let y = true;
45

0 commit comments

Comments
 (0)