import { FreeFunction } from '../callable'; import { ClassType } from '../class'; import { EnumType } from '../enum'; import { InterfaceType } from '../interface'; import { Module } from '../module'; import { MonkeyPatchedType } from '../monkey-patched-type'; import { IScope } from '../scope'; import { StructType } from '../struct'; import { TypeDeclaration } from '../type-declaration'; export interface RenderOptions { indentation?: number | string; } export declare abstract class Renderer { protected symbol: string; private emitter; /** * Stack of visible scopes during rendering, closest first */ private scopeStack; constructor(options?: RenderOptions); /** * Render a module to a string. */ render(scope: Module): string; /** * Render a module. */ protected abstract renderModule(scope: Module): void; /** * Render types of a module. */ protected renderModuleTypes(mod: Module): void; protected renderDeclaration(decl: TypeDeclaration): void; /** * Render an interface. */ protected abstract renderStruct(interfaceType: StructType): void; /** * Render an interface. */ protected abstract renderInterface(interfaceType: InterfaceType): void; /** * Render an enum. */ protected abstract renderEnum(enumType: EnumType): void; /** * Render a callable. */ protected abstract renderFunction(func: FreeFunction): void; /** * Render a class. */ protected abstract renderClass(cls: ClassType): void; protected renderMonkeyPatch(mod: MonkeyPatchedType): void; protected indent(): void; protected unindent(): void; protected emit(x: string): void; protected setIndentationSymbol(symbol?: number | string): string; protected emitList(xs: Iterable, sep: string, block: (x: A) => void): void; protected withScope(scope: IScope, block: () => void): void; protected get scopes(): ReadonlyArray; toString(): string; }