import { LuaNamedType, LuaType } from "./luaType"; export type Attribute = KnownAttribute | DefaultAttribute; export type KnownAttribute = ClassAttribute | EnumAttribute | FieldAttribute | FunctionAttribute | GlobalAttribute | ParamAttribute | ReturnAttribute | TableAttribute; interface BaseAttribute { attributeType: string; args: { description: string; }; } export interface DefaultAttribute extends BaseAttribute { } export interface FunctionAttribute extends BaseAttribute { attributeType: "function"; args: { name: readonly string[]; isMethod: boolean; description: string; }; } export interface ParamAttribute extends BaseAttribute { attributeType: "param"; args: { name: string; description: string; }; } export interface EnumAttribute extends BaseAttribute { attributeType: "enum"; args: { name: readonly string[]; description: string; }; } export interface TableAttribute extends BaseAttribute { attributeType: "table"; args: { isLocal: boolean; name: readonly string[]; description: string; }; } export interface ClassAttribute extends BaseAttribute { attributeType: "class"; args: { type: LuaNamedType; description: string; }; } export interface GlobalAttribute extends Omit { attributeType: "global"; } export interface ReturnAttribute extends BaseAttribute { attributeType: "return"; args: { type: LuaType; description: string; }; } export interface FieldAttribute extends BaseAttribute { attributeType: "field"; args: { name: readonly string[]; type: LuaType; description: string; }; } export declare function createAttribute(type: TType, args: Extract["args"]): Extract; export declare function isAttribute(attr: Attribute, name: TType): attr is Extract; export declare function formatAttribute(attribute: Readonly): string; export {};