mirror of https://github.com/sveltejs/svelte
Reword invalid_rest_eachblock_binding warning to better communicate about variables in nested rest properties
parent
561c602e84
commit
af865cd40a
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"code": "invalid-rest-eachblock-binding",
|
"code": "invalid-rest-eachblock-binding",
|
||||||
"message": "...rest operator will create a new object and binding propagation with original object will not work",
|
"message": "The rest operator (...) will create a new object and binding 'rest' with original object will not work",
|
||||||
"start": { "line": 8, "column": 24 },
|
"start": { "line": 8, "column": 27 },
|
||||||
"end": { "line": 8, "column": 31 }
|
"end": { "line": 8, "column": 31 }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"code": "invalid-rest-eachblock-binding",
|
"code": "invalid-rest-eachblock-binding",
|
||||||
"message": "...rest operator will create a new object and binding propagation with original object will not work",
|
"message": "The rest operator (...) will create a new object and binding 'rest' with original object will not work",
|
||||||
"start": { "line": 5, "column": 32 },
|
"start": { "line": 5, "column": 35 },
|
||||||
"end": { "line": 5, "column": 39 }
|
"end": { "line": 5, "column": 39 }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
const a = [[1, 2, 3, 4, 5]];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#each a as [first, second, ...[third, ...{ length }]]}
|
||||||
|
<p>{first}, {second}, {length}</p>
|
||||||
|
<input bind:value={third} />
|
||||||
|
<input bind:value={length} />
|
||||||
|
{/each}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"code": "invalid-rest-eachblock-binding",
|
||||||
|
"end": {
|
||||||
|
"column": 37,
|
||||||
|
"line": 5
|
||||||
|
},
|
||||||
|
"message": "The rest operator (...) will create a new object and binding 'third' with original object will not work",
|
||||||
|
"start": {
|
||||||
|
"column": 32,
|
||||||
|
"line": 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "invalid-rest-eachblock-binding",
|
||||||
|
"end": {
|
||||||
|
"column": 50,
|
||||||
|
"line": 5
|
||||||
|
},
|
||||||
|
"message": "The rest operator (...) will create a new object and binding 'length' with original object will not work",
|
||||||
|
"start": {
|
||||||
|
"column": 44,
|
||||||
|
"line": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"code": "invalid-rest-eachblock-binding",
|
"code": "invalid-rest-eachblock-binding",
|
||||||
"message": "...rest operator will create a new object and binding propagation with original object will not work",
|
"message": "The rest operator (...) will create a new object and binding 'rest' with original object will not work",
|
||||||
"start": { "line": 5, "column": 25 },
|
"start": { "line": 5, "column": 28 },
|
||||||
"end": { "line": 5, "column": 32 }
|
"end": { "line": 5, "column": 32 }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
Reference in new issue