-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Expand file tree
/
Copy pathspellingUncheckedJS.symbols
More file actions
95 lines (71 loc) · 2.99 KB
/
Copy pathspellingUncheckedJS.symbols
File metadata and controls
95 lines (71 loc) · 2.99 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
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
=== tests/cases/conformance/salsa/spellingUncheckedJS.js ===
export var inModule = 1
>inModule : Symbol(inModule, Decl(spellingUncheckedJS.js, 0, 10))
inmodule.toFixed()
function f() {
>f : Symbol(f, Decl(spellingUncheckedJS.js, 1, 18))
var locals = 2 + true
>locals : Symbol(locals, Decl(spellingUncheckedJS.js, 4, 7))
locale.toFixed()
// @ts-expect-error
localf.toExponential()
// @ts-expect-error
"this is fine"
}
class Classe {
>Classe : Symbol(Classe, Decl(spellingUncheckedJS.js, 10, 1))
non = 'oui'
>non : Symbol(Classe.non, Decl(spellingUncheckedJS.js, 11, 14))
methode() {
>methode : Symbol(Classe.methode, Decl(spellingUncheckedJS.js, 12, 15))
// no error on 'this' references
return this.none
>this : Symbol(Classe, Decl(spellingUncheckedJS.js, 10, 1))
}
}
class Derivee extends Classe {
>Derivee : Symbol(Derivee, Decl(spellingUncheckedJS.js, 17, 1))
>Classe : Symbol(Classe, Decl(spellingUncheckedJS.js, 10, 1))
methode() {
>methode : Symbol(Derivee.methode, Decl(spellingUncheckedJS.js, 18, 30))
// no error on 'super' references
return super.none
>super : Symbol(Classe, Decl(spellingUncheckedJS.js, 10, 1))
}
}
var object = {
>object : Symbol(object, Decl(spellingUncheckedJS.js, 26, 3), Decl(spellingUncheckedJS.js, 29, 15), Decl(spellingUncheckedJS.js, 30, 18))
spaaace: 3
>spaaace : Symbol(spaaace, Decl(spellingUncheckedJS.js, 26, 14))
}
object.spaaaace // error on read
>object : Symbol(object, Decl(spellingUncheckedJS.js, 26, 3), Decl(spellingUncheckedJS.js, 29, 15), Decl(spellingUncheckedJS.js, 30, 18))
object.spaace = 12 // error on write
>object : Symbol(object, Decl(spellingUncheckedJS.js, 26, 3), Decl(spellingUncheckedJS.js, 29, 15), Decl(spellingUncheckedJS.js, 30, 18))
object.fresh = 12 // OK
>object : Symbol(object, Decl(spellingUncheckedJS.js, 26, 3), Decl(spellingUncheckedJS.js, 29, 15), Decl(spellingUncheckedJS.js, 30, 18))
other.puuuce // OK, from another file
>other : Symbol(other, Decl(other.js, 3, 3))
new Date().getGMTDate() // OK, from another file
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --))
// No suggestions for globals from other files
const atoc = setIntegral(() => console.log('ok'), 500)
>atoc : Symbol(atoc, Decl(spellingUncheckedJS.js, 36, 5))
>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
>console : Symbol(console, Decl(lib.dom.d.ts, --, --))
>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
AudioBuffin // etc
Jimmy
>Jimmy : Symbol(Jimmy, Decl(other.js, 0, 3))
Jon
=== tests/cases/conformance/salsa/other.js ===
var Jimmy = 1
>Jimmy : Symbol(Jimmy, Decl(other.js, 0, 3))
var John = 2
>John : Symbol(John, Decl(other.js, 1, 3))
Jon // error, it's from the same file
var other = {
>other : Symbol(other, Decl(other.js, 3, 3))
puuce: 4
>puuce : Symbol(puuce, Decl(other.js, 3, 13))
}