@dlightjs/markit
Version:
Markit for DLight
33 lines (28 loc) • 944 B
TypeScript
import { Typed, ContentProp, View } from '@dlightjs/dlight';
interface MarkitProps {
str: ContentProp;
getAst?: (data: any) => any;
}
declare const _default: Typed<MarkitProps, object>;
declare const BlockRenderer: Record<string, Typed<{
mdProps: Object;
ast: any;
content: ContentProp;
}, object>>;
interface BlockRuleType {
name: string;
rule?: any;
view: (new (...args: any[]) => any & typeof View) | Function;
}
declare const addBlockRule: ({ name, rule, view }: BlockRuleType) => void;
declare const InlineRenderer: Record<string, Typed<{
mdProps: Object;
ast: ContentProp<string>;
}, object>>;
interface InlineRuleType {
name: string;
rule: any;
view: (new (...args: any[]) => any & typeof View) | Function;
}
declare const addInlineRule: ({ name, rule, view }: InlineRuleType) => void;
export { BlockRenderer, InlineRenderer, _default as MarkitView, addBlockRule, addInlineRule };