import type { ABIField } from "@ton/core"; import type * as Ast from "../ast/ast"; import type { SrcInfo } from "../grammar"; import type { ItemOrigin } from "../imports/source"; import type { Effect } from "./effects"; export type TypeDescription = { kind: "struct" | "primitive_type_decl" | "contract" | "trait"; origin: ItemOrigin; name: string; uid: number; header: Ast.Number | null; tlb: string | null; signature: string | null; fields: FieldDescription[]; partialFieldCount: number; traits: TypeDescription[]; functions: Map; receivers: ReceiverDescription[]; init: InitDescription | null; ast: Ast.TypeDecl; dependsOn: TypeDescription[]; globalVariables: Set; interfaces: string[]; constants: ConstantDescription[]; }; export type TypeRefRef = { kind: "ref"; name: string; optional: boolean; }; export type TypeRefMap = { kind: "map"; key: string; keyAs: string | null; value: string; valueAs: string | null; }; export type TypeRefBounced = { kind: "ref_bounced"; name: string; }; export type TypeRefVoid = { kind: "void"; }; export type TypeRefNull = { kind: "null"; }; export type TypeRef = TypeRefRef | TypeRefMap | TypeRefBounced | TypeRefVoid | TypeRefNull; export type FieldDescription = { name: string; index: number; type: TypeRef; as: string | null; default: Ast.Literal | undefined; loc: SrcInfo; ast: Ast.FieldDecl; abi: ABIField; }; export type ConstantDescription = { name: string; type: TypeRef; value: Ast.Literal | undefined; loc: SrcInfo; ast: Ast.ConstantDef | Ast.ConstantDecl; }; export type FunctionParameter = { name: Ast.OptionalId; type: TypeRef; loc: SrcInfo; }; export type FunctionDescription = { name: string; origin: ItemOrigin; isGetter: boolean; methodId: number | null; isMutating: boolean; isOverride: boolean; isVirtual: boolean; isAbstract: boolean; isInline: boolean; self: TypeRef | null; returns: TypeRef; params: FunctionParameter[]; ast: Ast.FunctionDef | Ast.NativeFunctionDecl | Ast.FunctionDecl | Ast.AsmFunctionDef; }; export type BinaryReceiverSelector = { kind: "internal-binary"; type: string; name: Ast.OptionalId; } | { kind: "bounce-binary"; name: Ast.OptionalId; type: string; bounced: boolean; } | { kind: "external-binary"; type: string; name: Ast.OptionalId; }; export type CommentReceiverSelector = { kind: "internal-comment"; comment: string; } | { kind: "external-comment"; comment: string; }; type EmptyReceiverSelector = { kind: "internal-empty"; } | { kind: "external-empty"; }; export type FallbackReceiverSelector = { kind: "internal-comment-fallback"; name: Ast.OptionalId; } | { kind: "internal-fallback"; name: Ast.OptionalId; } | { kind: "bounce-fallback"; name: Ast.OptionalId; } | { kind: "external-comment-fallback"; name: Ast.OptionalId; } | { kind: "external-fallback"; name: Ast.OptionalId; }; export type ReceiverSelector = BinaryReceiverSelector | CommentReceiverSelector | EmptyReceiverSelector | FallbackReceiverSelector; export declare function receiverSelectorName(selector: ReceiverSelector): string; export type ReceiverDescription = { selector: ReceiverSelector; ast: Ast.Receiver; effects: ReadonlySet; }; export type InitParameter = { name: Ast.OptionalId; type: TypeRef; as: Ast.Id | undefined; loc: SrcInfo; }; export type InitDescription = SeparateInitDescription | ContractInitDescription; type SeparateInitDescription = { kind: "init-function"; params: InitParameter[]; ast: Ast.ContractInit; }; type ContractInitDescription = { kind: "contract-params"; params: InitParameter[]; ast: Ast.ContractInit; contract: Ast.Contract; }; export declare function printTypeRef(src: TypeRef): string; export declare function typeRefEquals(a: TypeRef, b: TypeRef): boolean; export {};