import { Comment } from "./comment"; import { Attribute } from "./attribute"; import { Result } from "./result"; import { Position } from "./source"; export interface ParseDocResult { description: string; attributes: Attribute[]; path?: string; } export interface Doc { description: string; attributes: Attribute[]; path?: string; start: Position; end: Position; lua: string[]; } export declare function parseDoc(input: string): ParseDocResult[]; export declare function getDoc(comment: Comment): Result; export declare function formatDoc(doc: Doc): string; export declare function removeEmptyDocs(docs: Doc[]): Doc[]; export declare function isDocEmpty(doc: Doc): boolean; /** * Find an attribute of a given type in a document. * @param doc The document to search. * @param type The type of attribute to find. * @returns The attribute if found, otherwise null. */ export declare function findAttribute(doc: Doc, type: TType): Extract | null; /** * Check if a document has an attribute of a given type. * @param doc The document to search. * @param type The type of attribute to find. * @returns True if the document has an attribute of the given type. */ export declare function hasAttribute(doc: Doc, type: Attribute["attributeType"]): boolean; /** * Remove all attributes of a given type from a document and return them. * @param doc The document to remove attributes from. * @param type The type of attribute to remove. * @returns The removed attributes. */ export declare function removeAttributes(doc: Doc, type: TType): Extract[]; /** * Return all attributes of a given type from a document. * @param doc The document to remove attributes from. * @param type The type of attribute to remove. * @returns The removed attributes. */ export declare function filterAttributes(doc: Doc, type: TType): Extract[];