UNPKG

piral-vue-3

Version:

Plugin for integrating Vue@3 components in Piral.

20 lines (19 loc) 938 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 Vue3Converter { (...params: Parameters<ReturnType<typeof createConverter>>): HtmlComponent<any>; } export declare function createVue3Converter(...params: Parameters<typeof createConverter>): { from: Vue3Converter; Extension: Component<any>; defineMiddleware: (middleware: import("./lib/types").Vue3MiddlewareHandler) => void; }; declare const fromVue3: Vue3Converter, Vue3Extension: Component<any>, defineVue3Middleware: (middleware: import("./lib/types").Vue3MiddlewareHandler) => void; export { fromVue3, Vue3Extension, defineVue3Middleware };