import type { VariableType } from "../types.js";
export type ScopeType = VariableType | "any";
export declare class Scope {
    readonly key: string;
    readonly parent?: Scope;
    private readonly vars;
    private readonly consts;
    constructor(key: string, parent?: Scope);
    /**
     * Declare a binding. Writes to the nearest function scope (function-scoped
     * semantics). Block-level Scope instances delegate upward.
     */
    declare(name: string, type: ScopeType, isConst?: boolean): void;
    /**
     * Declare a binding *only* in this scope, without delegating to the
     * enclosing function scope. Use this for genuinely block-scoped
     * bindings whose lifetime ends with the enclosing block (e.g. callback
     * parameters introduced when synthesizing the body of a `xs.map(\(x) ->
     * …)` lambda — `x` must not leak to the surrounding function).
     *
     * Behaves like `declare` for one-shot use: `lookup` will find it via
     * the normal parent walk, and dropping the scope drops the binding.
     */
    declareLocal(name: string, type: ScopeType): void;
    lookup(name: string): ScopeType | undefined;
    isConst(name: string): boolean;
    has(name: string): boolean;
    child(key?: string): Scope;
    private functionScope;
}
