aaa
Rich Harris 8 months ago
parent 4a9c4c6f50
commit d7e74d9438

@ -233,6 +233,15 @@ export function invalid_arguments_usage(node) {
e(node, 'invalid_arguments_usage', `The arguments keyword cannot be used within the template or at the top level of a component\nhttps://svelte.dev/e/invalid_arguments_usage`); e(node, 'invalid_arguments_usage', `The arguments keyword cannot be used within the template or at the top level of a component\nhttps://svelte.dev/e/invalid_arguments_usage`);
} }
/**
* Cannot use `await` at the top level of a component, or in the template, unless in runes mode
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function legacy_await_invalid(node) {
e(node, 'legacy_await_invalid', `Cannot use \`await\` at the top level of a component, or in the template, unless in runes mode\nhttps://svelte.dev/e/legacy_await_invalid`);
}
/** /**
* Cannot use `export let` in runes mode use `$props()` instead * Cannot use `export let` in runes mode use `$props()` instead
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node
@ -497,15 +506,6 @@ export function typescript_invalid_feature(node, feature) {
e(node, 'typescript_invalid_feature', `TypeScript language features like ${feature} are not natively supported, and their use is generally discouraged. Outside of \`<script>\` tags, these features are not supported. For use within \`<script>\` tags, you will need to use a preprocessor to convert it to JavaScript before it gets passed to the Svelte compiler. If you are using \`vitePreprocess\`, make sure to specifically enable preprocessing script tags (\`vitePreprocess({ script: true })\`)\nhttps://svelte.dev/e/typescript_invalid_feature`); e(node, 'typescript_invalid_feature', `TypeScript language features like ${feature} are not natively supported, and their use is generally discouraged. Outside of \`<script>\` tags, these features are not supported. For use within \`<script>\` tags, you will need to use a preprocessor to convert it to JavaScript before it gets passed to the Svelte compiler. If you are using \`vitePreprocess\`, make sure to specifically enable preprocessing script tags (\`vitePreprocess({ script: true })\`)\nhttps://svelte.dev/e/typescript_invalid_feature`);
} }
/**
* Cannot use `await` at the top level of a component, or in the template, unless in runes mode
* @param {null | number | NodeLike} node
* @returns {never}
*/
export function legacy_await_invalid(node) {
e(node, 'legacy_await_invalid', `Cannot use \`await\` at the top level of a component, or in the template, unless in runes mode\nhttps://svelte.dev/e/legacy_await_invalid`);
}
/** /**
* Declaration cannot be empty * Declaration cannot be empty
* @param {null | number | NodeLike} node * @param {null | number | NodeLike} node

@ -419,7 +419,6 @@ declare module 'svelte' {
render: () => string; render: () => string;
setup?: (element: Element) => void | (() => void); setup?: (element: Element) => void | (() => void);
}): Snippet<Params>; }): Snippet<Params>;
export function create_suspense(): (() => void)[];
/** Anything except a function */ /** Anything except a function */
type NotFunction<T> = T extends Function ? never : T; type NotFunction<T> = T extends Function ? never : T;
/** /**

Loading…
Cancel
Save