/** * Exception thrown by `Scope` when trying to resolve an undefined variable. */ export declare class NameError extends Error { constructor(message: string); } /** * Represents a scope of variable definitions. */ export declare class Scope { names: Map; outer: Scope | null; constructor(outer?: Scope | null); /** * Defines a variable in the present scope. * Redefining a variable name is an error. * Masking variables defined in outer scopes is not an error. * Returns `true` if there are no errors. */ define(name: string, value: T): boolean; /** * Tries to resolve a variable name. * Throws a `NameError` if the variable is not defined. * Returns the value assigned to the variable. */ resolve(name: string): T; } //# sourceMappingURL=scopes.d.ts.map