@types/ltx
Version:
TypeScript definitions for ltx
18 lines (13 loc) • 482 B
TypeScript
import { EventEmitter } from "events";
import Element from "./Element";
export default class Parser extends EventEmitter {
static DefaultParser: typeof Parser;
static DefaultElement: typeof Element;
constructor(options?: ParserOptions);
write(data: string | { toString(): string }): void;
end(data: string | { toString(): string }): void;
}
export interface ParserOptions {
Parser?: typeof Parser | undefined;
Element?: typeof Element | undefined;
}