From 6a6b4ec36a11bb4434311c4735ff846b79c00ba0 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 5 Dec 2024 13:31:02 -0500 Subject: [PATCH] fix deprecation notices (#14574) --- packages/svelte/src/index-client.js | 6 +++--- packages/svelte/src/index.d.ts | 12 ++++++------ packages/svelte/types/index.d.ts | 18 +++++++++--------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/svelte/src/index-client.js b/packages/svelte/src/index-client.js index 72811c8f17..587d766233 100644 --- a/packages/svelte/src/index-client.js +++ b/packages/svelte/src/index-client.js @@ -83,7 +83,7 @@ function create_custom_event(type, detail, { bubbles = false, cancelable = false * }>(); * ``` * - * @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events + * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events) * @template {Record} [EventMap = any] * @returns {EventDispatcher} */ @@ -122,7 +122,7 @@ export function createEventDispatcher() { * * In runes mode use `$effect.pre` instead. * - * @deprecated Use `$effect.pre` instead — see https://svelte.dev/docs/svelte/$effect#$effect.pre + * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead * @param {() => void} fn * @returns {void} */ @@ -145,7 +145,7 @@ export function beforeUpdate(fn) { * * In runes mode use `$effect` instead. * - * @deprecated Use `$effect` instead — see https://svelte.dev/docs/svelte/$effect + * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead * @param {() => void} fn * @returns {void} */ diff --git a/packages/svelte/src/index.d.ts b/packages/svelte/src/index.d.ts index b8ba8b6f0a..e157ce76e2 100644 --- a/packages/svelte/src/index.d.ts +++ b/packages/svelte/src/index.d.ts @@ -53,7 +53,7 @@ export class SvelteComponent< /** * @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which * is a stop-gap solution. Migrate towards using `mount` instead. See - * https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more info. + * [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info. */ constructor(options: ComponentConstructorOptions>); /** @@ -83,14 +83,14 @@ export class SvelteComponent< /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $destroy(): void; /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $on>( @@ -100,7 +100,7 @@ export class SvelteComponent< /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $set(props: Partial): void; @@ -153,13 +153,13 @@ export interface Component< ): { /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $on?(type: string, callback: (e: any) => void): () => void; /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $set?(props: Partial): void; diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index 46a2137ae6..db6ac88c2c 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -50,7 +50,7 @@ declare module 'svelte' { /** * @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which * is a stop-gap solution. Migrate towards using `mount` instead. See - * https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more info. + * [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info. */ constructor(options: ComponentConstructorOptions>); /** @@ -80,14 +80,14 @@ declare module 'svelte' { /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $destroy(): void; /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $on>( @@ -97,7 +97,7 @@ declare module 'svelte' { /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $set(props: Partial): void; @@ -150,13 +150,13 @@ declare module 'svelte' { ): { /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $on?(type: string, callback: (e: any) => void): () => void; /** * @deprecated This method only exists when using one of the legacy compatibility helpers, which - * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes + * is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) * for more info. */ $set?(props: Partial): void; @@ -385,7 +385,7 @@ declare module 'svelte' { * }>(); * ``` * - * @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events + * @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events) * */ export function createEventDispatcher = any>(): EventDispatcher; /** @@ -395,7 +395,7 @@ declare module 'svelte' { * * In runes mode use `$effect.pre` instead. * - * @deprecated Use `$effect.pre` instead — see https://svelte.dev/docs/svelte/$effect#$effect.pre + * @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead * */ export function beforeUpdate(fn: () => void): void; /** @@ -405,7 +405,7 @@ declare module 'svelte' { * * In runes mode use `$effect` instead. * - * @deprecated Use `$effect` instead — see https://svelte.dev/docs/svelte/$effect + * @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead * */ export function afterUpdate(fn: () => void): void; /**