regenerate types

pull/14001/head
Ben McCann 2 years ago
parent fa85e9ec55
commit b9ac9fb76b

@ -2,7 +2,7 @@ declare module 'svelte' {
/** /**
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions. * @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
* Use `mount` instead to instantiate components. * Use `mount` instead to instantiate components.
* See [breaking changes](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) * See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info. * for more info.
*/ */
export interface ComponentConstructorOptions< export interface ComponentConstructorOptions<
@ -36,7 +36,7 @@ declare module 'svelte' {
* This was the base class for Svelte components in Svelte 4. Svelte 5+ components * This was the base class for Svelte components in Svelte 4. Svelte 5+ components
* are completely different under the hood. For typing, use `Component` instead. * are completely different under the hood. For typing, use `Component` instead.
* To instantiate components, use `mount` instead`. * To instantiate components, use `mount` instead`.
* See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more info. * See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info.
*/ */
export class SvelteComponent< export class SvelteComponent<
Props extends Record<string, any> = Record<string, any>, Props extends Record<string, any> = Record<string, any>,
@ -50,7 +50,7 @@ declare module 'svelte' {
/** /**
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which * @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
* is a stop-gap solution. Migrate towards using `mount` instead. See * is a stop-gap solution. Migrate towards using `mount` instead. See
* https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info. * https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more info.
*/ */
constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>); constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);
/** /**
@ -80,14 +80,14 @@ declare module 'svelte' {
/** /**
* @deprecated This method only exists when using one of the legacy compatibility helpers, which * @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* for more info. * for more info.
*/ */
$destroy(): void; $destroy(): void;
/** /**
* @deprecated This method only exists when using one of the legacy compatibility helpers, which * @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* for more info. * for more info.
*/ */
$on<K extends Extract<keyof Events, string>>( $on<K extends Extract<keyof Events, string>>(
@ -97,7 +97,7 @@ declare module 'svelte' {
/** /**
* @deprecated This method only exists when using one of the legacy compatibility helpers, which * @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* for more info. * for more info.
*/ */
$set(props: Partial<Props>): void; $set(props: Partial<Props>): void;
@ -150,13 +150,13 @@ declare module 'svelte' {
): { ): {
/** /**
* @deprecated This method only exists when using one of the legacy compatibility helpers, which * @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* for more info. * for more info.
*/ */
$on?(type: string, callback: (e: any) => void): () => void; $on?(type: string, callback: (e: any) => void): () => void;
/** /**
* @deprecated This method only exists when using one of the legacy compatibility helpers, which * @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes * is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* for more info. * for more info.
*/ */
$set?(props: Partial<Props>): void; $set?(props: Partial<Props>): void;
@ -168,7 +168,7 @@ declare module 'svelte' {
} }
/** /**
* @deprecated Use `Component` instead. See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more information. * @deprecated Use `Component` instead. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more information.
*/ */
export class SvelteComponentTyped< export class SvelteComponentTyped<
Props extends Record<string, any> = Record<string, any>, Props extends Record<string, any> = Record<string, any>,
@ -275,7 +275,7 @@ declare module 'svelte' {
* ``` * ```
* You can only call a snippet through the `{@render ...}` tag. * You can only call a snippet through the `{@render ...}` tag.
* *
* https://svelte-5-preview.vercel.app/docs/snippets * https://svelte.dev/docs/svelte/snippet
* *
* @template Parameters the parameters that the snippet expects (if any) as a tuple. * @template Parameters the parameters that the snippet expects (if any) as a tuple.
*/ */
@ -456,8 +456,6 @@ declare module 'svelte' {
export function tick(): Promise<void>; export function tick(): Promise<void>;
/** /**
* Use `untrack` to prevent something from being treated as an `$effect`/`$derived` dependency. * Use `untrack` to prevent something from being treated as an `$effect`/`$derived` dependency.
*
* https://svelte-5-preview.vercel.app/docs/functions#untrack
* */ * */
export function untrack<T>(fn: () => T): T; export function untrack<T>(fn: () => T): T;
/** /**

Loading…
Cancel
Save