-
-
Notifications
You must be signed in to change notification settings - Fork 690
Expand file tree
/
Copy pathtuple.ts.fixture.ts
More file actions
68 lines (68 loc) · 1.55 KB
/
tuple.ts.fixture.ts
File metadata and controls
68 lines (68 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
function tuple0(): [] {
return [];
}
function tuple1(): [i32, i32] {
return [1, 2];
}
function tuple2(): [i32, [i32, i32]] {
return [1, [2, 3]];
}
function tuple3(): [i32, string] {
return [1, "a"];
}
function tuple4(): [Array<i32>, Array<i32>] {
return [new Array<i32>(), [1, 2]];
}
function tuple5(): [i32] {
return [1];
}
function tuple6(): [[Array<i32>]] {
return [[[1, 2]]];
}
function tuple7(): [x: i32, y: i32] {
return [1, 2];
}
function tuple8(): [head: i32, tail: [lo: i32, hi: i32]] {
return [1, [2, 3]];
}
function func0(x: []): [] {
return [];
}
function func1(x: i32, y: i32): [i32, i32] {
return [y, x];
}
function func2(x: [i32, i32]): [i32, i32] {
return x;
}
function func3(x: [i32, [i32, i32]], y: i32): [i32, [i32, i32]] {
return x;
}
function func4(x: [i32, string]): [void] {
return [void(0)];
}
function func5(x: [Array<i32>, Array<i32>]): [i32] {
return [x[1].length];
}
function func6(x: [i32, i32] | null): [i32, i32] | null {
return x;
}
function func7(x: [[Array<i32>], [string]]): [[Array<i32>], [string]] {
return x;
}
function func8(x: [left: i32, right: i32]): [first: i32, second: i32] {
return x;
}
function func9<T>(x: [T, T, i32]): [T] {
return x;
}
function func10(x: [string | null, i32] | null): [string | null, i32] | null {
return x;
}
type type0 = [];
type type1 = [i32, i32];
type type2 = [i32, [i32, i32]];
type type3 = [i32, string];
type type4 = [i32, i32] | null;
type type5 = [[i32, i32], [i32, i32]];
type type6<T> = [Array<T>, Array<T>, T];
type type7 = [start: i32, end: [lo: i32, hi: i32]];