@cycle/html
Version:
A driver for HTML strings based on Snabbdom and the DOM driver
12 lines (11 loc) • 536 B
TypeScript
import { Driver } from '@cycle/run';
import { Stream } from 'xstream';
import { VNode } from 'snabbdom/vnode';
import { HTMLSource } from './HTMLSource';
export declare type Module = (vnode: VNode, attributes: Map<string, any>) => void;
export interface HTMLDriverOptions {
modules?: Array<Module>;
reportSnabbdomError?(err: any): void;
}
export declare type EffectCallback = (html: string) => void;
export declare function makeHTMLDriver(effect: EffectCallback, options?: HTMLDriverOptions): Driver<Stream<VNode>, HTMLSource>;