pull/12985/head
Dominic Gannaway 2 years ago
parent 2e36c94e27
commit 5b2645a0a7

@ -279,50 +279,50 @@ export function rune_outside_svelte(rune) {
}
/**
* Reading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state.
* Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
* @returns {never}
*/
export function state_unsafe_local_read() {
export function state_descriptors_fixed() {
if (DEV) {
const error = new Error(`state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using \`untrack\` to read locally created state.`);
const error = new Error(`state_descriptors_fixed\nProperty descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.`);
error.name = 'Svelte error';
throw error;
} else {
// TODO print a link to the documentation
throw new Error("state_unsafe_local_read");
throw new Error("state_descriptors_fixed");
}
}
/**
* Property descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.
* Cannot set prototype of `$state` object
* @returns {never}
*/
export function state_descriptors_fixed() {
export function state_prototype_fixed() {
if (DEV) {
const error = new Error(`state_descriptors_fixed\nProperty descriptors defined on \`$state\` objects must contain \`value\` and always be \`enumerable\`, \`configurable\` and \`writable\`.`);
const error = new Error(`state_prototype_fixed\nCannot set prototype of \`$state\` object`);
error.name = 'Svelte error';
throw error;
} else {
// TODO print a link to the documentation
throw new Error("state_descriptors_fixed");
throw new Error("state_prototype_fixed");
}
}
/**
* Cannot set prototype of `$state` object
* Reading state that was created inside the same derived is forbidden. Consider using `untrack` to read locally created state.
* @returns {never}
*/
export function state_prototype_fixed() {
export function state_unsafe_local_read() {
if (DEV) {
const error = new Error(`state_prototype_fixed\nCannot set prototype of \`$state\` object`);
const error = new Error(`state_unsafe_local_read\nReading state that was created inside the same derived is forbidden. Consider using \`untrack\` to read locally created state.`);
error.name = 'Svelte error';
throw error;
} else {
// TODO print a link to the documentation
throw new Error("state_prototype_fixed");
throw new Error("state_unsafe_local_read");
}
}

Loading…
Cancel
Save