UNPKG

phrase-engine

Version:

Language files on steroids for conversational UIs that aren't boring.

21 lines (20 loc) 725 B
import { VarsPacket } from './Node'; import { SentenceNode } from "./Nodes/SentenceNode"; import { EvalPacketInterface } from "./Node"; export interface DataInterface { [key: string]: any; } export default class PhraseEngine { protected __sentence: SentenceNode; constructor(sentence: SentenceNode); static getDOMParser(): { new (): DOMParser; }; static compile(xml: string): PhraseEngine; protected makeEvalPacket(data: DataInterface): EvalPacketInterface; protected makePresentable(components: string[]): string; random(data?: DataInterface): string; iterate(data?: DataInterface): IterableIterator<string>; vars(): VarsPacket; count(data?: DataInterface): number; }