type HashFunction = (str: string) => string; export default class Encoder { _hash: HashFunction; _slen: number; _refmap: Map; _refset: Set; constructor(hash: HashFunction, slen?: number); _ref_str(str: any): any; _encode_prim(obj: any): string | undefined; _encode_obj(obj: any, ref?: any): string; _encode_term(obj: any): string; _encode_deep(obj: any, depth: any): string; encode(obj: any): string; commit(): {}; clear(): void; } export {};