mirror of https://github.com/sveltejs/svelte
fix missing-declaration warning for use:obj.method (#5454)
parent
4c135b0b8d
commit
6e0cd9bcbf
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
const obj = {
|
||||
foo : "bar",
|
||||
action(element, { leet }) {
|
||||
element.foo = this.foo + leet;
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<button use:obj.action={{ leet: 1337 }}>action</button>
|
||||
<button use:foo.action={{ leet: 1337 }}>action</button>
|
@ -0,0 +1,17 @@
|
||||
[
|
||||
{
|
||||
"code": "missing-declaration",
|
||||
"end": {
|
||||
"character": 217,
|
||||
"column": 39,
|
||||
"line": 11
|
||||
},
|
||||
"message": "'foo' is not defined",
|
||||
"pos": 186,
|
||||
"start": {
|
||||
"character": 186,
|
||||
"column": 8,
|
||||
"line": 11
|
||||
}
|
||||
}
|
||||
]
|
Loading…
Reference in new issue