piral-mithril
Version:
Plugin for integrating Mithril.js components in Piral.
17 lines (16 loc) • 560 B
TypeScript
import type { ForeignComponent, BaseComponentProps } from 'piral-core';
import type { Component } from './types';
export interface MithrilConverterOptions {
/**
* Defines the name of the root element.
* @default piral-slot
*/
rootName?: string;
}
export declare function createConverter(config?: MithrilConverterOptions): {
<TProps extends BaseComponentProps>(component: Component<TProps>, captured?: Record<string, any>): ForeignComponent<TProps>;
Extension: {
oncreate(vnode: any): void;
view(): any;
};
};