/** * Stack Output — marks a value for cross-stack export. * * When a child project declares `stackOutput(ref)`, the serializer emits * it into the template's Outputs section. The parent can then reference * it via `nestedStack().outputs.name`. */ import { DECLARABLE_MARKER, type Declarable } from "./declarable.js"; import { AttrRef } from "./attrref.js"; import { type Intrinsic } from "./intrinsic.js"; /** * Marker symbol for stack output identification. */ export declare const STACK_OUTPUT_MARKER: unique symbol; /** * A stack output declaration — wraps an AttrRef into a Declarable * that serializers emit as a template Output. */ export interface StackOutput extends Declarable { readonly [STACK_OUTPUT_MARKER]: true; readonly [DECLARABLE_MARKER]: true; readonly lexicon: string; readonly entityType: string; readonly kind: "output"; /** The exported value: a bare attribute reference, an intrinsic wrapping * one (e.g. `Join(",", zone.NameServers)`), or a literal string. */ readonly sourceRef: AttrRef | Intrinsic | string; readonly description?: string; /** When set, the serializer emits a cross-stack export under this name * (CloudFormation `Output.Export.Name`) in addition to the plain output. */ readonly exportName?: string; } /** * Type guard for StackOutput. */ export declare function isStackOutput(value: unknown): value is StackOutput; /** * Create a stack output that exports an attribute reference for cross-stack use. * * @param ref - The AttrRef to export (e.g. `vpc.vpcId`) * @param options - Optional description for the output * @returns A StackOutput Declarable * * @example * ```ts * import { stackOutput } from "@intentius/chant"; * import { vpc, subnet } from "./vpc"; * * export const vpcId = stackOutput(vpc.vpcId); * export const subnetId = stackOutput(subnet.subnetId, { * description: "Primary subnet ID", * }); * ``` */ export declare function stackOutput(ref: AttrRef | Intrinsic | string, options?: { description?: string; exportName?: string; lexicon?: string; }): StackOutput; //# sourceMappingURL=stack-output.d.ts.map