Type Alias ComponentType<Component>
ComponentType <Component>: (new (options: ComponentConstructorOptions<Component extends SvelteComponent<infer Props>
? Props
: Record<string, any>>) => Component) & {
element?: typeof HTMLElement;
}
? Props
: Record<string, any>>) => Component) & {
element?: typeof HTMLElement;
}
Type Parameters
- Component extends SvelteComponent = SvelteComponent
Type declaration
Optional
element?: typeof HTMLElementThe custom element version of the component. Only present if compiled with the
customElement
compiler option
Convenience type to get the type of a Svelte component. Useful for example in combination with dynamic components using
<svelte:component>
.Example: