opaque-rune
Dominic Gannaway 9 months ago
parent 84a34aeff5
commit e319adda01

@ -751,7 +751,7 @@ 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 must be an identifier. `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier.
``` ```
For example: `let [state, invalidate] = $state.opaque(data);` For example: `let [state, invalidate] = $state.opaque(data);`

@ -433,12 +433,12 @@ export function state_invalid_export(node) {
} }
/** /**
* `$state.opaque(...)` must be declared with an destructured array pattern and the state expression must be an identifier. * `$state.opaque(...)` must be declared with an destructured array pattern and the state expression and invalidation expression must be an identifier.
* @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 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 invalidation expression must be an identifier.");
} }
/** /**

Loading…
Cancel
Save