export type TryCompile = (node: any) => string; export type HoistedNode = { key: string; name: string; body: string; doc?: string; bucket?: string; deps?: string[]; }; export type CompileSections = { [bucket: string]: HoistedNode[]; }; export type CompileResult = { sections: CompileSections; body: string; }; export type HoistHandler = { type: string; matches(x: any): x is T; key?(x: T): string | undefined; id?(x: T): string | undefined; classify?(x: T): string | undefined; dependencies(x: T): any[]; isSimple(x: T): boolean; renderInline(x: T, tryCompile: TryCompile): string; renderHoisted(x: T, tryCompile: TryCompile): Rendered; refName?(x: T, assignedName: string): string; }; export type Rendered = { body: string; doc?: string; name?: string; bucket?: string; }; export type NodeHandler = HoistHandler; export type CompilerOptions = { nameForKey?: (k: string, bucket?: string) => string; maxNameCollisions?: number; }; export declare class HoistCompilerBuilder { private handlers; add(h: HoistHandler): this; private computeKey; build(opts?: CompilerOptions): { tryCompile: TryCompile; compileAll: (roots: any[]) => CompileResult; emit: (res: CompileResult) => string; }; } //# sourceMappingURL=compiler.d.ts.map