Type Alias TJSSvelteConfig

TJSSvelteConfig: {
    anchor?: Element;
    class: new (
        options: ComponentConstructorOptions<Record<string, any>>,
    ) => SvelteComponent<any, any, any>;
    context?:
        | () => { [key: string]: any } | Map<string, any>
        | Map<string, any>
        | { [key: string]: any };
    hydrate?: boolean;
    intro?: boolean;
    props?: () => { [key: string]: any } | { [key: string]: any };
    target?: Element | Document | ShadowRoot;
}

Defines the TRL / client side configuration object to load a Svelte component.

Type declaration

  • Optionalanchor?: Element

    A child of target to render the component immediately before.

  • class: new (
        options: ComponentConstructorOptions<Record<string, any>>,
    ) => SvelteComponent<any, any, any>

    The Svelte component class / constructor function.

  • Optionalcontext?:
        | () => { [key: string]: any } | Map<string, any>
        | Map<string, any>
        | { [key: string]: any }

    The root-level context to pass to the component. You may define context as a callback function.

  • Optionalhydrate?: boolean

    See description in main Svelte docs Creating a component.

  • Optionalintro?: boolean

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

  • Optionalprops?: () => { [key: string]: any } | { [key: string]: any }

    Props to pass to the component. You may define props as a callback function.

  • Optionaltarget?: Element | Document | ShadowRoot

    The target to render component to. By default, document.body is used as the target if not otherwise defined.