/** * Attribute emission helpers * * Emits C# attribute syntax from IrAttribute nodes as CSharpAttributeAst. * * Example: * ```typescript * A().add(SerializableAttribute); * A().add(DataContractAttribute, { Name: "UserDTO" }); * A().method((x) => x.foo).target("return").add(MarshalAsAttribute, UnmanagedType.Bool); * ``` * * Emits: * ```csharp * [global::System.SerializableAttribute] * [global::System.Runtime.Serialization.DataContractAttribute(Name = "UserDTO")] * [return: global::System.Runtime.InteropServices.MarshalAsAttribute(global::System.Runtime.InteropServices.UnmanagedType.Bool)] * public class User { ... } * ``` */ import { IrAttribute } from "@tsonic/frontend"; import { EmitterContext } from "../../types.js"; import type { CSharpAttributeAst } from "./backend-ast/types.js"; /** * Emit all attributes for a declaration as CSharpAttributeAst[]. * * @param attributes - Array of attributes (may be undefined) * @param context - Emitter context * @returns Tuple of [attribute ASTs, context] */ export declare const emitAttributes: (attributes: readonly IrAttribute[] | undefined, context: EmitterContext) => [readonly CSharpAttributeAst[], EmitterContext]; /** * Emit parameter-level attributes as CSharpAttributeAst[]. * * @param attributes - Array of attributes (may be undefined) * @param context - Emitter context * @returns Tuple of [attribute ASTs, context] */ export declare const emitParameterAttributes: (attributes: readonly IrAttribute[] | undefined, context: EmitterContext) => [readonly CSharpAttributeAst[], EmitterContext]; //# sourceMappingURL=attributes.d.ts.map