UNPKG

piral-million

Version:

Plugin for integrating Million components in Piral.

19 lines (18 loc) 890 B
import { createConverter } from './lib/converter'; export interface HtmlComponent<TProps> { component: { mount(element: HTMLElement, props: TProps, ctx: any, locals: any): void; update?(element: HTMLElement, props: TProps, ctx: any, locals: any): void; unmount?(element: HTMLElement, locals: any): void; }; type: 'html'; } export interface MillionConverter { (...params: Parameters<ReturnType<typeof createConverter>>): HtmlComponent<any>; } export declare function createMillionConverter(...params: Parameters<typeof createConverter>): { from: MillionConverter; Extension: (props: import("piral-core").ExtensionSlotProps) => import("million").VElement; }; declare const fromMillion: MillionConverter, MillionExtension: (props: import("piral-core").ExtensionSlotProps) => import("million").VElement; export { fromMillion, MillionExtension };