8000 Accepting new baselines · nycdotnet/TypeScript@979186f · GitHub
[go: up one dir, main page]

Skip to content

Commit 979186f

Browse files
committed
Accepting new baselines
1 parent 5643f91 commit 979186f

File tree

3 files changed

+219
-0
lines changed

3 files changed

+219
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//// [destructuringInFunctionType.ts]
2+
3+
interface a { a }
4+
interface b { b }
5+
interface c { c }
6+
7+
type T1 = ([a, b, c]);
8+
type F1 = ([a, b, c]) => void;
9+
10+
type T2 = ({ a });
11+
type F2 = ({ a }) => void;
12+
13+
type T3 = ([{ a: b }, { b: a }]);
14+
type F3 = ([{ a: b }, { b: a }]) => void;
15+
16+
type T4 = ([{ a: [b, c] }]);
17+
type F4 = ([{ a: [b, c] }]) => void;
18+
19+
type C1 = new ([{ a: [b, c] }]) => void;
20+
21+
var v1 = ([a, b, c]) => "hello";
22+
var v2: ([a, b, c]) => string;
23+
24+
25< 10000 /td>+
//// [destructuringInFunctionType.js]
26+
var v1 = function (_a) {
27+
var a = _a[0], b = _a[1], c = _a[2];
28+
return "hello";
29+
};
30+
var v2;
31+
32+
33+
//// [destructuringInFunctionType.d.ts]
34+
interface a {
35+
a: any;
36+
}
37+
interface b {
38+
b: any;
39+
}
40+
interface c {
41+
c: any;
42+
}
43+
declare type T1 = ([a, b, c]);
44+
declare type F1 = ([a, b, c]) => void;
45+
declare type T2 = ({
46+
a;
47+
});
48+
declare type F2 = ({a}) => void;
49+
declare type T3 = ([{
50+
a: b;
51+
}, {
52+
b: a;
53+
}]);
54+
declare type F3 = ([{a: b}, {b: a}]) => void;
55+
declare type T4 = ([{
56+
a: [b, c];
57+
}]);
58+
declare type F4 = ([{a: [b, c]}]) => void;
59+
declare type C1 = new ([{a: [b, c]}]) => void;
60+
declare var v1: ([a, b, c]: [any, any, any]) => string;
61+
declare var v2: ([a, b, c]) => string;
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
=== tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts ===
2+
3+
interface a { a }
4+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 0, 0))
5+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 1, 13))
6+
7+
interface b { b }
8+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 1, 17))
9+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 2, 13))
10+
11+
interface c { c }
12+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 2, 17))
13+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 3, 13))
14+
15+
type T1 = ([a, b, c]);
16+
>T1 : Symbol(T1, Decl(destructuringInFunctionType.ts, 3, 17))
17+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 0, 0))
18+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 1, 17))
19+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 2, 17))
20+
21+
type F1 = ([a, b, c]) => void;
22+
>F1 : Symbol(F1, Decl(destructuringInFunctionType.ts, 5, 22))
23+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 6, 12))
24+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 6, 14))
25+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 6, 17))
26+
27+
type T2 = ({ a });
28+
>T2 : Symbol(T2, Decl(destructuringInFunctionType.ts, 6, 30))
29+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 8, 12))
30+
31+
type F2 = ({ a }) => void;
32+
>F2 : Symbol(F2, Decl(destructuringInFunctionType.ts, 8, 18))
33+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 9, 12))
34+
35+
type T3 = ([{ a: b }, { b: a }]);
36+
>T3 : Symbol(T3, Decl(destructuringInFunctionType.ts, 9, 26))
37+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 11, 13))
38+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 1, 17))
39+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 11, 23))
40+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 0, 0))
41+
42+
type F3 = ([{ a: b }, { b: a }]) => void;
43+
>F3 : Symbol(F3, Decl(destructuringInFunctionType.ts, 11, 33))
44+
>a : Symbol(a)
45+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 12, 13))
46+
>b : Symbol(b)
47+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 12, 23))
48+
49+
type T4 = ([{ a: [b, c] }]);
50+
>T4 : Symbol(T4, Decl(destructuringInFunctionType.ts, 12, 41))
51+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 14, 13))
52+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 1, 17))
53+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 2, 17))
54+
55+
type F4 = ([{ a: [b, c] }]) => void;
56+
>F4 : Symbol(F4, Decl(destructuringInFunctionType.ts, 14, 28))
57+
>a : Symbol(a)
58+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 15, 18))
59+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 15, 20))
60+
61+
type C1 = new ([{ a: [b, c] }]) => void;
62+
>C1 : Symbol(C1, Decl(destructuringInFunctionType.ts, 15, 36))
63+
>a : Symbol(a)
64+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 17, 22))
65+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 17, 24))
66+
67+
var v1 = ([a, b, c]) => "hello";
68+
>v1 : Symbol(v1, Decl(destructuringInFunctionType.ts, 19, 3))
69+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 19, 11))
70+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 19, 13))
71+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 19, 16))
72+
73+
var v2: ([a, b, c]) => string;
74+
>v2 : Symbol(v2, Decl(destructuringInFunctionType.ts, 20, 3))
75+
>a : Symbol(a, Decl(destructuringInFunctionType.ts, 20, 10))
76+
>b : Symbol(b, Decl(destructuringInFunctionType.ts, 20, 12))
77+
>c : Symbol(c, Decl(destructuringInFunctionType.ts, 20, 15))
78+
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
=== tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts ===
2+
3+
interface a { a }
4+
>a : a
5+
>a : any
6+
7+
interface b { b }
8+
>b : b
9+
>b : any
10+
11+
interface c { c }
12+
>c : c
13+
>c : any
14+
15+
type T1 = ([a, b, c]);
16+
>T1 : [a, b, c]
17+
>a : a
18+
>b : b
19+
>c : c
20+
21+
type F1 = ([a, b, c]) => void;
22+
>F1 : ([a, b, c]: [any, any, any]) => void
23+
>a : any
24+
>b : any
25+
>c : any
26+
27+
type T2 = ({ a });
28+
>T2 : { a: any; }
29+
>a : any
30+
31+
type F2 = ({ a }) => void;
32+
>F2 : ({ a }: { a: any; }) => void
33+
>a : any
34+
35+
type T3 = ([{ a: b }, { b: a }]);
36+
>T3 : [{ a: b; }, { b: a; }]
37+
>a : b
38+
>b : b
39+
>b : a
40+
>a : a
41+
42+
type F3 = ([{ a: b }, { b: a }]) => void;
43+
>F3 : ([{ a: b }, { b: a }]: [{ a: any; }, { b: any; }]) => void
44+
>a : any
45+
>b : any
46+
>b : any
47+
>a : any
48+
49+
type T4 = ([{ a: [b, c] }]);
50+
>T4 : [{ a: [b, c]; }]
51+
>a : [b, c]
52+
>b : b
53+
>c : c
54+
55+
type F4 = ([{ a: [b, c] }]) => void;
56+
>F4 : ([{ a: [b, c] }]: [{ a: [any, any]; }]) => void
57+
>a : any
58+
>b : any
59+
>c : any
60+
61+
type C1 = new ([{ a: [b, c] }]) => void;
62+
>C1 : new ([{ a: [b, c] }]: [{ a: [any, any]; }]) => void
63+
>a : any
64+
>b : any
65+
>c : any
66+
67+
var v1 = ([a, b, c]) => "hello";
68+
>v1 : ([a, b, c]: [any, any, any]) => string
69+
>([a, b, c]) => "hello" : ([a, b, c]: [any, any, any]) => string
70+
>a : any
71+
>b : any
72+
>c : any
73+
>"hello" : string
74+
75+
var v2: ([a, b, c]) => string;
76+
>v2 : ([a, b, c]: [any, any, any]) => string
77+
>a : any
78+
>b : any
79+
>c : any
80+

0 commit comments

Comments
 (0)
0