declare type Children = Record; declare class Node { key: string; depth: number; isWord: boolean; children: Children; parent: Node | undefined; failure: Node | undefined; constructor(key: string, depth?: number, isWord?: boolean, children?: Children, parent?: Node | undefined, failure?: Node | undefined); } declare class Censor { private targets; replaceWidth: string; root: Node; constructor(targets?: string[], replaceWidth?: string, root?: Node); createTree(): void; filter(text: string, options?: { replace: boolean; replaceWidth?: string; }): { text: string; words: string[]; pass: boolean; }; collectWord(node: Node): string; } export { Censor, Node }; export default Censor;