Type Alias WidgetCreateFn<Config>

WidgetCreateFn: (
    element: Element,
    config?: Config,
) => Widget | Widget[] | null | Promise<Widget | Widget[] | null>

NOTE: If the function returns a widget or a list of widgets created for the given element, then each one will be automatically destroyed if the element is removed from the DOM.

Type Parameters

  • Config extends Record<string, unknown>

Type declaration