Skip to content

Commit 5ad3d1b

Browse files
committed
Add more tests
1 parent 32f1b4e commit 5ad3d1b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// @strict: true
2+
3+
function f00([x, y]) {}
4+
function f01([x, y] = []) {}
5+
function f02([x, y] = [1]) {}
6+
function f03([x, y] = [1, 'foo']) {}
7+
8+
function f10([x = 0, y]) {}
9+
function f11([x = 0, y] = []) {}
10+
function f12([x = 0, y] = [1]) {}
11+
function f13([x = 0, y] = [1, 'foo']) {}
12+
13+
function f20([x = 0, y = 'bar']) {}
14+
function f21([x = 0, y = 'bar'] = []) {}
15+
function f22([x = 0, y = 'bar'] = [1]) {}
16+
function f23([x = 0, y = 'bar'] = [1, 'foo']) {}
17+
18+
declare const nx: number | undefined;
19+
declare const sx: string | undefined;
20+
21+
function f30([x = 0, y = 'bar']) {}
22+
function f31([x = 0, y = 'bar'] = []) {}
23+
function f32([x = 0, y = 'bar'] = [nx]) {}
24+
function f33([x = 0, y = 'bar'] = [nx, sx]) {}
25+
26+
function f40([x = 0, y = 'bar']) {}
27+
function f41([x = 0, y = 'bar'] = []) {}
28+
function f42([x = 0, y = 'bar'] = [sx]) {}
29+
function f43([x = 0, y = 'bar'] = [sx, nx]) {}

0 commit comments

Comments
 (0)