piral-vue
Version:
Plugin for integrating Vue@2 components in Piral.
19 lines (18 loc) • 730 B
TypeScript
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 VueConverter {
(...params: Parameters<ReturnType<typeof createConverter>>): HtmlComponent<any>;
}
export declare function createVueConverter(...params: Parameters<typeof createConverter>): {
from: VueConverter;
Extension: Component<any>;
};
declare const fromVue: VueConverter, VueExtension: Component<any>;
export { fromVue, VueExtension };