import * as ts from "typescript"; type JsonObject = { [key: string]: JsonValue; }; type JsonArray = JsonValue[]; export type JsonValue = string | number | boolean | null | JsonObject | JsonArray; export type ImportSpecifier = { name: string; as?: string; isTypeOnly: boolean; }; /** * A helper class to build up a TypeScript document AST. */ export default class TSAstBuilder { private _destination; private importModuleSpecifierEnding; _globalNames: Map; _imports: ts.Statement[]; imports: Map; _helpers: ts.Statement[]; _statements: ts.Statement[]; constructor(_destination: string, importModuleSpecifierEnding: string); addHelper(statement: ts.Statement): void; addStatement(statement: ts.Statement): void; createBlockWithScope(closure: () => void): ts.Block; method(name: string, params: ts.ParameterDeclaration[], statements: ts.Statement[], isAsync?: boolean): ts.MethodDeclaration; param(name: string, type?: ts.TypeNode): ts.ParameterDeclaration; propertyAccessChain(parent: ts.Expression, members: ts.MemberName[]): ts.Expression; functionDeclaration(name: string, modifiers: ts.Modifier[] | undefined, parameters: ts.ParameterDeclaration[], type: ts.TypeNode | undefined, body: ts.Block): void; objectLiteral(properties: Array): ts.ObjectLiteralExpression; boolean(value: boolean): ts.BooleanLiteral; json(value: JsonValue): ts.Expression; constDeclaration(name: string, initializer: ts.Expression, type?: ts.TypeNode): void; import(from: string, names: ImportSpecifier[]): void; importDefault(from: string, as: string): void; importUserConstruct(tsModulePath: string, exportName: string | null, localName: string, isTypeOnly: boolean): void; print(): string; getUniqueName(name: string): string; } export {};