Type Alias ComponentType<Component>
ComponentType: new (
options: ComponentConstructorOptions<
Component extends SvelteComponent<infer Props>
? Props
: Record<string, any>,
>,
) => Component & { element?: typeof HTMLElement }
options: ComponentConstructorOptions<
Component extends SvelteComponent<infer Props>
? Props
: Record<string, any>,
>,
) => Component & { element?: typeof HTMLElement }
Type Parameters
- Component extends SvelteComponent = SvelteComponent
Type declaration
- new (
options: ComponentConstructorOptions<
Component extends SvelteComponent<infer Props>
? Props
: Record<string, any>,
>,
): Component Parameters
- options: ComponentConstructorOptions<
Component extends SvelteComponent<infer Props>
? Props
: Record<string, any>,
>
Returns Component
- options: ComponentConstructorOptions<
- new (
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: