diff --git a/.changeset/rotten-cups-float.md b/.changeset/rotten-cups-float.md new file mode 100644 index 0000000000..e58d4f26df --- /dev/null +++ b/.changeset/rotten-cups-float.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +chore: provide `ComponentExports` utility type diff --git a/packages/svelte/src/index.d.ts b/packages/svelte/src/index.d.ts index 5130721cbe..262337ef0a 100644 --- a/packages/svelte/src/index.d.ts +++ b/packages/svelte/src/index.d.ts @@ -237,6 +237,26 @@ export type ComponentProps> = ? Props : never; +/** + * Convenience type to get the properties that given component exports. + * + * Example: Typing the `bind:this` for a component named `MyComponent` + * ``` + *