docs: remove `createRoot` references (#12018)

* docs: remove `createRoot` references

* changeset
pull/12024/head
Ignatius Bagus 6 months ago committed by GitHub
parent bf23f692fe
commit 1ecbbc0914
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"svelte": patch
---
chore: remove `createRoot` references

@ -4,7 +4,7 @@ import './ambient.js';
/**
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
* Use `mount` or `createRoot` 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)
* for more info.
*/
@ -36,7 +36,7 @@ type Properties<Props, Slots> = Props &
/**
* 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.
* To instantiate components, use `mount` or `createRoot`.
* 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.
*/
export class SvelteComponent<
@ -50,7 +50,7 @@ export class SvelteComponent<
[prop: string]: any;
/**
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
* is a stop-gap solution. Migrate towards using `mount` or `createRoot` 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.
*/
constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);

@ -1,7 +1,7 @@
declare module 'svelte' {
/**
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
* Use `mount` or `createRoot` 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)
* for more info.
*/
@ -33,7 +33,7 @@ declare module 'svelte' {
/**
* 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.
* To instantiate components, use `mount` or `createRoot`.
* 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.
*/
export class SvelteComponent<
@ -47,7 +47,7 @@ declare module 'svelte' {
[prop: string]: any;
/**
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
* is a stop-gap solution. Migrate towards using `mount` or `createRoot` 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.
*/
constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);

Loading…
Cancel
Save