UNPKG

ts-budgie

Version:

Converts TypeScript code to Budgie.

38 lines (37 loc) 1.07 kB
import { BudgieLine } from "../output/budgieLine"; import { IContextOptions } from "../service"; /** * Shared context for visitors in a file. */ export declare class VisitorContext { /** * Current type coercion, if any. */ private typeCoercion?; /** * Constant conversion options for visiting nodes. */ readonly options: IContextOptions; /** * Initializes a new instance of the VisitorContext class. * * @param options Constant conversion options for visiting nodes. */ constructor(options: IContextOptions); /** * @returns The current type coercion, if any exists. */ readonly coercion: string | BudgieLine | undefined; /** * Sets a new type coercion. * * @param coercion A new type coercion. */ setTypeCoercion(coercion: string | BudgieLine): void; /** * Exists the type coercion. * * @returns The exited type coercion, if any. */ exitTypeCoercion(): string | BudgieLine | undefined; }