diff --git a/packages/svelte/src/index.d.ts b/packages/svelte/src/index.d.ts index 84c318b7547d..81dc936147fa 100644 --- a/packages/svelte/src/index.d.ts +++ b/packages/svelte/src/index.d.ts @@ -210,9 +210,11 @@ export type ComponentEvents = * import MyComponent from './MyComponent.svelte'; * * // Errors if these aren't the correct props expected by MyComponent. - * const props: ComponentProps = { foo: 'bar' }; + * const props: ComponentProps = { foo: 'bar' }; * ``` * + * > [!NOTE] In Svelte 4, you would do `ComponentProps` because `MyComponent` was a class. + * * Example: A generic function that accepts some component and infers the type of its props: * * ```ts diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index d5f86482d324..df4c04db0173 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -207,9 +207,11 @@ declare module 'svelte' { * import MyComponent from './MyComponent.svelte'; * * // Errors if these aren't the correct props expected by MyComponent. - * const props: ComponentProps = { foo: 'bar' }; + * const props: ComponentProps = { foo: 'bar' }; * ``` * + * > [!NOTE] In Svelte 4, you would do `ComponentProps` because `MyComponent` was a class. + * * Example: A generic function that accepts some component and infers the type of its props: * * ```ts