regenerate types

pull/12507/head
Rich Harris 2 years ago
parent dd926cde27
commit 38e8fb680a

@ -3,51 +3,35 @@
import { DEV } from 'esm-env';
/**
* `%name%(...)` can only be used during component initialisation
* @param {string} name
* @returns {never}
*/
export function lifecycle_outside_component(name) {
if (DEV) {
const error = new Error(`lifecycle_outside_component\n\`${name}(...)\` can only be used during component initialisation`);
error.name = 'Svelte error';
throw error;
} else {
// TODO print a link to the documentation
throw new Error("lifecycle_outside_component");
}
}
/**
* The argument to `{@render ...}` must be a snippet function, not a component or a slot with a `let:` directive or some other kind of function. If you want to dynamically render one snippet or another, use `$derived` and pass its result to `{@render ...}`
* Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead
* @returns {never}
*/
export function render_tag_invalid_argument() {
export function invalid_default_snippet() {
if (DEV) {
const error = new Error(`render_tag_invalid_argument\nThe argument to \`{@render ...}\` must be a snippet function, not a component or a slot with a \`let:\` directive or some other kind of function. If you want to dynamically render one snippet or another, use \`$derived\` and pass its result to \`{@render ...}\``);
const error = new Error(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead`);
error.name = 'Svelte error';
throw error;
} else {
// TODO print a link to the documentation
throw new Error("render_tag_invalid_argument");
throw new Error("invalid_default_snippet");
}
}
/**
* Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead
* `%name%(...)` can only be used during component initialisation
* @param {string} name
* @returns {never}
*/
export function invalid_default_snippet() {
export function lifecycle_outside_component(name) {
if (DEV) {
const error = new Error(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead`);
const error = new Error(`lifecycle_outside_component\n\`${name}(...)\` can only be used during component initialisation`);
error.name = 'Svelte error';
throw error;
} else {
// TODO print a link to the documentation
throw new Error("invalid_default_snippet");
throw new Error("lifecycle_outside_component");
}
}

Loading…
Cancel
Save