Skip to content

Commit 1ecbbc0

Browse files
authored
docs: remove createRoot references (#12018)
* docs: remove `createRoot` references * changeset
1 parent bf23f69 commit 1ecbbc0

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.changeset/dull-pens-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
chore: remove `createRoot` references

packages/svelte/src/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import './ambient.js';
44

55
/**
66
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
7-
* Use `mount` or `createRoot` instead to instantiate components.
7+
* Use `mount` instead to instantiate components.
88
* See [breaking changes](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes)
99
* for more info.
1010
*/
@@ -36,7 +36,7 @@ type Properties<Props, Slots> = Props &
3636
/**
3737
* This was the base class for Svelte components in Svelte 4. Svelte 5+ components
3838
* are completely different under the hood. For typing, use `Component` instead.
39-
* To instantiate components, use `mount` or `createRoot`.
39+
* To instantiate components, use `mount` instead`.
4040
* See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more info.
4141
*/
4242
export class SvelteComponent<
@@ -50,7 +50,7 @@ export class SvelteComponent<
5050
[prop: string]: any;
5151
/**
5252
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
53-
* is a stop-gap solution. Migrate towards using `mount` or `createRoot` instead. See
53+
* is a stop-gap solution. Migrate towards using `mount` instead. See
5454
* https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info.
5555
*/
5656
constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);

packages/svelte/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
declare module 'svelte' {
22
/**
33
* @deprecated In Svelte 4, components are classes. In Svelte 5, they are functions.
4-
* Use `mount` or `createRoot` instead to instantiate components.
4+
* Use `mount` instead to instantiate components.
55
* See [breaking changes](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes)
66
* for more info.
77
*/
@@ -33,7 +33,7 @@ declare module 'svelte' {
3333
/**
3434
* This was the base class for Svelte components in Svelte 4. Svelte 5+ components
3535
* are completely different under the hood. For typing, use `Component` instead.
36-
* To instantiate components, use `mount` or `createRoot`.
36+
* To instantiate components, use `mount` instead`.
3737
* See [breaking changes documentation](https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes) for more info.
3838
*/
3939
export class SvelteComponent<
@@ -47,7 +47,7 @@ declare module 'svelte' {
4747
[prop: string]: any;
4848
/**
4949
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
50-
* is a stop-gap solution. Migrate towards using `mount` or `createRoot` instead. See
50+
* is a stop-gap solution. Migrate towards using `mount` instead. See
5151
* https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info.
5252
*/
5353
constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);

0 commit comments

Comments
 (0)