mirror of https://github.com/sveltejs/svelte
Merge pull request #2321 from sveltejs/gh-2295
Fix exception and warning for global variablespull/2326/head
commit
a59cd36a39
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "binding-undeclared",
|
||||||
|
"message": "foo is not declared",
|
||||||
|
"pos": 58,
|
||||||
|
"start": {
|
||||||
|
"line": 4,
|
||||||
|
"column": 19,
|
||||||
|
"character": 58
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 4,
|
||||||
|
"column": 22,
|
||||||
|
"character": 61
|
||||||
|
}
|
||||||
|
}]
|
@ -0,0 +1,4 @@
|
|||||||
|
<script>
|
||||||
|
console.log(foo);
|
||||||
|
</script>
|
||||||
|
<input bind:value={foo}>
|
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
console.log(potato);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<p>{potato}</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
[{
|
||||||
|
"code": "missing-declaration",
|
||||||
|
"message": "'potato' is not defined",
|
||||||
|
"pos": 46,
|
||||||
|
"start": {
|
||||||
|
"line": 5,
|
||||||
|
"column": 4,
|
||||||
|
"character": 46
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"line": 5,
|
||||||
|
"column": 10,
|
||||||
|
"character": 52
|
||||||
|
}
|
||||||
|
}]
|
Loading…
Reference in new issue