diff --git a/packages/svelte/src/compiler/index.js b/packages/svelte/src/compiler/index.js index 74678f518daf..42427dd9c407 100644 --- a/packages/svelte/src/compiler/index.js +++ b/packages/svelte/src/compiler/index.js @@ -98,6 +98,8 @@ export function compileModule(source, options) { * The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST. * `modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7. * + * The `loose` option, available since 5.13.0, tries to always return an AST even if the input will not successfully compile. + * * @param {string} source * @param {{ filename?: string; rootDir?: string; modern?: boolean; loose?: boolean }} [options] * @returns {AST.Root | LegacyRoot} diff --git a/packages/svelte/src/internal/client/render.js b/packages/svelte/src/internal/client/render.js index f4b7944c14c5..767b23013169 100644 --- a/packages/svelte/src/internal/client/render.js +++ b/packages/svelte/src/internal/client/render.js @@ -272,9 +272,9 @@ let mounted_components = new WeakMap(); /** * Unmounts a component that was previously mounted using `mount` or `hydrate`. * - * If `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. + * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. * - * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise. + * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`). * * ```js * import { mount, unmount } from 'svelte'; diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index bafa7a2265e5..dca0fd99f0b7 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -449,9 +449,9 @@ declare module 'svelte' { /** * Unmounts a component that was previously mounted using `mount` or `hydrate`. * - * If `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. + * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. * - * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise. + * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`). * * ```js * import { mount, unmount } from 'svelte';