Bootstrap

API widget

callWidgetFactoryWithConfig

function

callWidgetFactoryWithConfig<W>(parameter): W & object

Call a widget factory using provided configs.

Type Parameters

W extends Widget<object, object, object, object, object>

Parameters

parameter

the parameter

parameter.$$props: Partial<WidgetProps<W>>

the props of the widget

parameter.$$slots?: SlotsPresent<WidgetProps<W>>

the slots of the widget

parameter.defaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the default config of the widget

parameter.events?: Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}Change`>

the events of the widget

parameter.factory: WidgetFactory<W>

the widget factory to call

parameter.widgetConfig?: null | ReadableSignal<undefined | Partial<WidgetProps<W>>>

the config of the widget, overriding the defaultConfig

Returns

W & object

the widget


isSvelteComponent

function

isSvelteComponent<Props>(content): content is SlotSvelteComponent<Props>

A type guard checking if a provided slot content is a Svelte component.

Type Parameters

Props extends object

Parameters

content: SlotContent<Props>

the slot content

Returns

content is SlotSvelteComponent<Props>

true if the slot content is a svelte component