register error properly

pull/16607/head
Jack Goodall 4 weeks ago
parent 80540843c2
commit 92e9e79c6c

@ -56,6 +56,12 @@ Here, `List.svelte` is using `{@render children(item)` which means it expects `P
A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}` A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`
``` ```
### invalid_spread_bindings
```
`%name%` must be a function or `undefined`
```
### lifecycle_outside_component ### lifecycle_outside_component
``` ```

@ -60,7 +60,7 @@
## bind_invalid_expression ## bind_invalid_expression
> Can only bind to an Identifier or MemberExpression or a `{get, set}` pair > Can only bind to an Identifier, a MemberExpression, a SpreadElement, or a `{get, set}` pair
## bind_invalid_name ## bind_invalid_name

@ -48,6 +48,10 @@ Here, `List.svelte` is using `{@render children(item)` which means it expects `P
> A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}` > A snippet function was passed invalid arguments. Snippets should only be instantiated via `{@render ...}`
## invalid_spread_bindings
> `%name%` must be a function or `undefined`
## lifecycle_outside_component ## lifecycle_outside_component
> `%name%(...)` can only be used during component initialisation > `%name%(...)` can only be used during component initialisation

@ -830,12 +830,12 @@ export function bind_group_invalid_snippet_parameter(node) {
} }
/** /**
* Can only bind to an Identifier or MemberExpression or a `{get, set}` pair * Can only bind to an Identifier, a MemberExpression, a SpreadElement, or a `{get, set}` pair
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function bind_invalid_expression(node) { export function bind_invalid_expression(node) {
e(node, 'bind_invalid_expression', `Can only bind to an Identifier or MemberExpression or a \`{get, set}\` pair\nhttps://svelte.dev/e/bind_invalid_expression`); e(node, 'bind_invalid_expression', `Can only bind to an Identifier, a MemberExpression, a SpreadElement, or a \`{get, set}\` pair\nhttps://svelte.dev/e/bind_invalid_expression`);
} }
/** /**

Loading…
Cancel
Save