import type { Children, OutputSymbol, Refkey } from "@alloy-js/core"; export interface MemberExpressionProps { children: Children; } declare const Part: (_props: MemberExpressionPartProps) => void; /** * Create a member expression from parts. Each part can provide one of * the following: * * * **id**: The identifier for the member expression part * * **refkey**: a refkey for a symbol whose name becomes the identifier * * **symbol**: a symbol whose name becomes the identifier part * * **args**: create a method call with the given args * * **children**: arbitrary contents for the identifier part * * **await**: whether to await the value that results from this part of the member expression * * Each part can have a nullish prop, which indicates that the part may be null * or undefined. * * Each part can also have a quoteId prop, which indicates that the identifier * of the part should be quoted (i.e. `["foo"]` instead of `.foo`). This is only * necessary when providing the children prop, otherwise it is determined * automatically. * * @example * * ```tsx * * * * * * SomeValue * * ``` * * Assuming `rk` is a refkey to a symbol name "prop1", and `sym` is a symbol * with a name of "prop2", this will render: * * ```ts * base.prop1?.prop2("hello", "world").SomeValue * ``` */ export declare function MemberExpression(props: MemberExpressionProps): Children; export declare namespace MemberExpression { export { Part }; } export interface MemberExpressionPartProps { /** * The identifier for this part of the member expression. */ id?: string | number; /** * The index for this part of the member expression. This is used when * the part is an array access (i.e. `foo[0]`). */ index?: number; /** * Whether the identifier should be quoted or not. Only needed when * providing the `children` prop, otherwise it is determined automatically. */ quoteId?: boolean; /** * A refkey for a symbol whose name becomes the identifier. */ refkey?: Refkey; /** * A symbol whose name becomes the identifier. */ symbol?: OutputSymbol; /** * Arguments to construct a call expression. */ args?: Children[] | boolean; /** * Whether to await the value that results from this part of the member expression. */ await?: boolean; /** * This part is nullish. Subsequent parts use conditional access operators. */ nullish?: boolean; /** * The contents of this part. When passed, overrides the other props except * nullish. */ children?: Children; } export {}; //# sourceMappingURL=MemberExpression.d.ts.map