import type { TsNode } from "./tsIR.js";
/**
 * Fluent wrapper for TsNode construction.
 * Reads left-to-right instead of inside-out.
 *
 * Usage: $(ts.id("foo")).prop("bar").call([arg]).await().done()
 */
export declare class TsChain {
    readonly node: TsNode;
    constructor(node: TsNode);
    /** Property access: .prop("foo") → ts.prop(this, "foo") */
    prop(name: string, opts?: {
        optional?: boolean;
    }): TsChain;
    map(fn: TsNode): TsChain;
    /** Computed index: .index(expr) → ts.index(this, expr) */
    index(expr: TsNode): TsChain;
    /** Function call: .call([arg1, arg2]) → ts.call(this, [arg1, arg2]) */
    call(args?: TsNode[]): TsChain;
    namedArgs(args: Record<string, TsNode>): TsChain;
    /** Await: .await() → ts.await(this) */
    await(): TsChain;
    /** Assign: .assign(rhs) → ts.assign(this, rhs) */
    assign(rhs: TsNode): TsChain;
    /** Spread: .spread() → ts.spread(this) */
    spread(): TsChain;
    /** Binary minus: .minus(rhs) → ts.binOp(this, "-", rhs) */
    minus(rhs: TsNode): TsChain;
    /** Binary plus: .plus(rhs) → ts.binOp(this, "+", rhs) */
    plus(rhs: TsNode): TsChain;
    /** Binary equals: .equal(rhs) → ts.binOp(this, "===", rhs) */
    equal(rhs: TsNode): TsChain;
    /** Unwrap to plain TsNode */
    done(): TsNode;
}
/** Wrap any TsNode in a fluent chain */
export declare function $(node: TsNode): TsChain;
export declare namespace $ {
    var id: (name: string) => TsChain;
    var z: () => TsChain;
}
