opaque-rune
Dominic Gannaway 9 months ago
parent e319adda01
commit 0e9eca38ed

@ -751,11 +751,9 @@ Cannot export state from a module if it is reassigned. Either export a function
### state_invalid_opaque_declaration ### state_invalid_opaque_declaration
``` ```
`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier. `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)
``` ```
For example: `let [state, invalidate] = $state.opaque(data);`
### state_invalid_placement ### state_invalid_placement
``` ```

@ -170,9 +170,7 @@ It's possible to export a snippet from a `<script module>` block, but only if it
## state_invalid_opaque_declaration ## state_invalid_opaque_declaration
> `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier. > `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)
For example: `let [state, invalidate] = $state.opaque(data);`
## state_invalid_placement ## state_invalid_placement

@ -433,12 +433,12 @@ export function state_invalid_export(node) {
} }
/** /**
* `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier. * `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
* @returns {never} * @returns {never}
*/ */
export function state_invalid_opaque_declaration(node) { export function state_invalid_opaque_declaration(node) {
e(node, "state_invalid_opaque_declaration", "`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier."); e(node, "state_invalid_opaque_declaration", "`$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidate expression must be an identifier (e.g. `let [state, invalidate] = $state.opaque(data);`)");
} }
/** /**

Loading…
Cancel
Save