Interface Embed<Component, Config>

Defines the TRL / client side embed configuration object to load a Svelte component that is suitable to be mounted directly by the <svelte:component> directive. Just class and props are supported.

interface Embed<
    Component extends SvelteComponent = SvelteComponent,
    Config extends
        { PropsOmit?: keyof ComponentProps<Component> } = { PropsOmit: never },
> {
    class: new (
        options: ComponentConstructorOptions<ComponentProps<Component>>,
    ) => Component;
    intro?: boolean;
    props?: Partial<Omit<ComponentProps<Component>, Config["PropsOmit"]>>;
}

Type Parameters

  • Component extends SvelteComponent = SvelteComponent

    A specific component to narrow the allowed class and props.

  • Config extends { PropsOmit?: keyof ComponentProps<Component> } = { PropsOmit: never }

    Additional options to omit properties from allowed in context or props.

Hierarchy

Properties

Properties

The Svelte component class / constructor function.

intro?: boolean

If true, will play transitions on initial render, rather than waiting for subsequent state changes.

props?: Partial<Omit<ComponentProps<Component>, Config["PropsOmit"]>>

Props to pass to the component. You may define props as an object.