File: lateBoundDestructuringImplicitAnyError.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 (114 lines) | stat: -rw-r--r-- 2,229 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
=== tests/cases/compiler/lateBoundDestructuringImplicitAnyError.ts ===
let named = "foo";
>named : string
>"foo" : "foo"

let {[named]: prop} = {prop: "foo"};
>named : string
>prop : any
>{prop: "foo"} : { prop: string; }
>prop : string
>"foo" : "foo"

void prop;
>void prop : undefined
>prop : any

const numIndexed: {[idx: number]: string} = null as any;
>numIndexed : { [idx: number]: string; }
>idx : number
>null as any : any
>null : null

const strIndexed: {[idx: string]: string} = null as any;
>strIndexed : { [idx: string]: string; }
>idx : string
>null as any : any
>null : null

let numed = 6;
>numed : number
>6 : 6

const symed = Symbol();
>symed : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor

let symed2 = Symbol();
>symed2 : symbol
>Symbol() : symbol
>Symbol : SymbolConstructor

let {[named]: prop2} = numIndexed;
>named : string
>prop2 : any
>numIndexed : { [idx: number]: string; }

void prop2;
>void prop2 : undefined
>prop2 : any

let {[numed]: prop3} = numIndexed;
>numed : number
>prop3 : string
>numIndexed : { [idx: number]: string; }

void prop3;
>void prop3 : undefined
>prop3 : string

let {[named]: prop4} = strIndexed;
>named : string
>prop4 : string
>strIndexed : { [idx: string]: string; }

void prop4;
>void prop4 : undefined
>prop4 : string

let {[numed]: prop5} = strIndexed;
>numed : number
>prop5 : string
>strIndexed : { [idx: string]: string; }

void prop5;
>void prop5 : undefined
>prop5 : string

let {[symed]: prop6} = numIndexed;
>symed : unique symbol
>prop6 : any
>numIndexed : { [idx: number]: string; }

void prop6;
>void prop6 : undefined
>prop6 : any

let {[symed]: prop7} = strIndexed;
>symed : unique symbol
>prop7 : string
>strIndexed : { [idx: string]: string; }

void prop7;
>void prop7 : undefined
>prop7 : string

let {[symed2]: prop8} = numIndexed;
>symed2 : symbol
>prop8 : any
>numIndexed : { [idx: number]: string; }

void prop8;
>void prop8 : undefined
>prop8 : any

let {[symed2]: prop9} = strIndexed;
>symed2 : symbol
>prop9 : string
>strIndexed : { [idx: string]: string; }

void prop9;
>void prop9 : undefined
>prop9 : string