File: declarationEmitDestructuring2.types

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (68 lines) | stat: -rw-r--r-- 1,596 bytes parent folder | download | duplicates (5)
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
=== tests/cases/compiler/declarationEmitDestructuring2.ts ===
function f({x = 10, y: [a, b, c, d] = [1, 2, 3, 4]} = { x: 10, y: [2, 4, 6, 8] }) { }
>f : ({ x, y: [a, b, c, d] }?: { x?: number; y?: [number, number, number, number]; }) => void
>x : number
>10 : 10
>y : any
>a : number
>b : number
>c : number
>d : number
>[1, 2, 3, 4] : [number, number, number, number]
>1 : 1
>2 : 2
>3 : 3
>4 : 4
>{ x: 10, y: [2, 4, 6, 8] } : { x?: number; y?: [number, number, number, number]; }
>x : number
>10 : 10
>y : [number, number, number, number]
>[2, 4, 6, 8] : [number, number, number, number]
>2 : 2
>4 : 4
>6 : 6
>8 : 8

function g([a, b, c, d] = [1, 2, 3, 4]) { }
>g : ([a, b, c, d]?: [number, number, number, number]) => void
>a : number
>b : number
>c : number
>d : number
>[1, 2, 3, 4] : [number, number, number, number]
>1 : 1
>2 : 2
>3 : 3
>4 : 4

function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ }
>h : ([a, [b], [[c]], { x, y: [a, b, c], z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y: [any, any, any]; z: { a1: any; b1: any; }; }]) => void
>a : any
>b : any
>c : any
>x : number
>10 : 10
>y : any
>a : any
>b : any
>c : any
>z : any
>a1 : any
>b1 : any

function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ }
>h1 : ([a, [b], [[c]], { x, y, z: { a1, b1 } }]: [any, [any], [[any]], { x?: number; y?: number[]; z: { a1: any; b1: any; }; }]) => void
>a : any
>b : any
>c : any
>x : number
>10 : 10
>y : number[]
>[1, 2, 3] : number[]
>1 : 1
>2 : 2
>3 : 3
>z : any
>a1 : any
>b1 : any