/** * Utilities for parsing TSDoc comments. * @internal */ import { ParserContext, DocComment } from '@microsoft/tsdoc'; import type { TSESTree } from '@typescript-eslint/utils'; import type { ReleaseTag } from '../types'; /** * Parses a TSDoc comment string. * * @param commentText - The full comment text including delimiters * @returns Parser context with the parsed doc comment * @alpha */ export declare function parseTSDocComment(commentText: string): ParserContext; /** * Extracts a release tag from a parsed TSDoc comment. * * @param docComment - The parsed doc comment * @returns The release tag if found, undefined otherwise * @alpha */ export declare function extractReleaseTag(docComment: DocComment): ReleaseTag | undefined; /** * Checks if a TSDoc comment has the @override tag. * * @param docComment - The parsed doc comment * @returns True if @override tag is present * @alpha */ export declare function hasOverrideTag(docComment: DocComment): boolean; /** * Checks if a TSDoc comment has the @packageDocumentation tag. * * @param docComment - The parsed doc comment * @returns True if @packageDocumentation tag is present * @alpha */ export declare function hasPackageDocumentation(docComment: DocComment): boolean; /** * Enum type values for `@enumType` tag. * @alpha */ export type EnumTypeValue = 'closed' | 'open'; /** * Result of extracting `@enumType` tag from a TSDoc comment. * @alpha */ export interface EnumTypeExtraction { /** Whether any `@enumType` tags were found */ found: boolean; /** Number of `@enumType` tags found */ count: number; /** The extracted value (lowercase), or undefined if missing/invalid */ value?: string; /** Whether the value is valid ('open' or 'closed') */ isValid: boolean; /** The original raw value from the comment */ rawValue?: string; } /** * Extracts `@enumType` tag information from a TSDoc comment. * * @param commentText - The full comment text including delimiters * @returns Extraction result with tag information * @alpha */ export declare function extractEnumType(commentText: string): EnumTypeExtraction; /** * Gets the leading comment for a node, if it's a TSDoc comment. * * @param sourceCode - ESLint source code object * @param node - The AST node to check * @returns The comment text if a TSDoc comment exists, undefined otherwise * @alpha */ export declare function getLeadingTSDocComment(sourceCode: { getCommentsBefore: (node: TSESTree.Node) => TSESTree.Comment[] }, node: TSESTree.Node): string | undefined; /** * Finds all TSDoc comments in a source file. * * @param sourceCode - ESLint source code object * @returns Array of comment objects with their parsed content * @alpha */ export declare function findAllTSDocComments(sourceCode: { getAllComments: () => TSESTree.Comment[] }): Array<{ comment: TSESTree.Comment; parsed: ParserContext; }>; //# sourceMappingURL=tsdoc-parser.d.ts.map