fix: mark function properties on runes as deprecated for better intellisense (#11439)

Ensures that IDEs will order the to the bottom so that the rune variants are on top, better visible

closes #11437
pull/11433/head
Simon H 8 months ago committed by GitHub
parent 6e5ab2e678
commit 9c5a9d8e20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"svelte": patch
---
fix: mark function properties on runes as deprecated for better intellisense

@ -62,6 +62,27 @@ declare namespace $state {
* @param state The value to snapshot * @param state The value to snapshot
*/ */
export function snapshot<T>(state: T): T; export function snapshot<T>(state: T): T;
// prevent intellisense from being unhelpful
/** @deprecated */
export const apply: never;
/** @deprecated */
// @ts-ignore
export const arguments: never;
/** @deprecated */
export const bind: never;
/** @deprecated */
export const call: never;
/** @deprecated */
export const caller: never;
/** @deprecated */
export const length: never;
/** @deprecated */
export const name: never;
/** @deprecated */
export const prototype: never;
/** @deprecated */
export const toString: never;
} }
/** /**
@ -98,6 +119,27 @@ declare namespace $derived {
* https://svelte-5-preview.vercel.app/docs/runes#$derived-by * https://svelte-5-preview.vercel.app/docs/runes#$derived-by
*/ */
export function by<T>(fn: () => T): T; export function by<T>(fn: () => T): T;
// prevent intellisense from being unhelpful
/** @deprecated */
export const apply: never;
/** @deprecated */
// @ts-ignore
export const arguments: never;
/** @deprecated */
export const bind: never;
/** @deprecated */
export const call: never;
/** @deprecated */
export const caller: never;
/** @deprecated */
export const length: never;
/** @deprecated */
export const name: never;
/** @deprecated */
export const prototype: never;
/** @deprecated */
export const toString: never;
} }
/** /**
@ -186,6 +228,27 @@ declare namespace $effect {
* https://svelte-5-preview.vercel.app/docs/runes#$effect-root * https://svelte-5-preview.vercel.app/docs/runes#$effect-root
*/ */
export function root(fn: () => void | (() => void)): () => void; export function root(fn: () => void | (() => void)): () => void;
// prevent intellisense from being unhelpful
/** @deprecated */
export const apply: never;
/** @deprecated */
// @ts-ignore
export const arguments: never;
/** @deprecated */
export const bind: never;
/** @deprecated */
export const call: never;
/** @deprecated */
export const caller: never;
/** @deprecated */
export const length: never;
/** @deprecated */
export const name: never;
/** @deprecated */
export const prototype: never;
/** @deprecated */
export const toString: never;
} }
/** /**

@ -2623,6 +2623,27 @@ declare namespace $state {
* @param state The value to snapshot * @param state The value to snapshot
*/ */
export function snapshot<T>(state: T): T; export function snapshot<T>(state: T): T;
// prevent intellisense from being unhelpful
/** @deprecated */
export const apply: never;
/** @deprecated */
// @ts-ignore
export const arguments: never;
/** @deprecated */
export const bind: never;
/** @deprecated */
export const call: never;
/** @deprecated */
export const caller: never;
/** @deprecated */
export const length: never;
/** @deprecated */
export const name: never;
/** @deprecated */
export const prototype: never;
/** @deprecated */
export const toString: never;
} }
/** /**
@ -2659,6 +2680,27 @@ declare namespace $derived {
* https://svelte-5-preview.vercel.app/docs/runes#$derived-by * https://svelte-5-preview.vercel.app/docs/runes#$derived-by
*/ */
export function by<T>(fn: () => T): T; export function by<T>(fn: () => T): T;
// prevent intellisense from being unhelpful
/** @deprecated */
export const apply: never;
/** @deprecated */
// @ts-ignore
export const arguments: never;
/** @deprecated */
export const bind: never;
/** @deprecated */
export const call: never;
/** @deprecated */
export const caller: never;
/** @deprecated */
export const length: never;
/** @deprecated */
export const name: never;
/** @deprecated */
export const prototype: never;
/** @deprecated */
export const toString: never;
} }
/** /**
@ -2747,6 +2789,27 @@ declare namespace $effect {
* https://svelte-5-preview.vercel.app/docs/runes#$effect-root * https://svelte-5-preview.vercel.app/docs/runes#$effect-root
*/ */
export function root(fn: () => void | (() => void)): () => void; export function root(fn: () => void | (() => void)): () => void;
// prevent intellisense from being unhelpful
/** @deprecated */
export const apply: never;
/** @deprecated */
// @ts-ignore
export const arguments: never;
/** @deprecated */
export const bind: never;
/** @deprecated */
export const call: never;
/** @deprecated */
export const caller: never;
/** @deprecated */
export const length: never;
/** @deprecated */
export const name: never;
/** @deprecated */
export const prototype: never;
/** @deprecated */
export const toString: never;
} }
/** /**

Loading…
Cancel
Save