tsd
Version:
Check TypeScript type definitions
26 lines (25 loc) • 1.34 kB
TypeScript
import { TypeChecker, Expression, JSDocTagInfo } from '@tsd/typescript';
/**
* Resolve the JSDoc tags from the expression. If these tags couldn't be found, it will return `undefined`.
*
* @param checker - The TypeScript type checker.
* @param expression - The expression to resolve the JSDoc tags for.
* @return A unique Set of JSDoc tags or `undefined` if they couldn't be resolved.
*/
export declare const resolveJSDocTags: (checker: TypeChecker, expression: Expression) => Map<string, JSDocTagInfo> | undefined;
/**
* Resolve the documentation comment from the expression. If the comment can't be found, it will return `undefined`.
*
* @param checker - The TypeScript type checker.
* @param expression - The expression to resolve the documentation comment for.
* @return A string of the documentation comment or `undefined` if it can't be resolved.
*/
export declare const resolveDocComment: (checker: TypeChecker, expression: Expression) => string | undefined;
/**
* Convert a TypeScript expression to a string.
*
* @param checker - The TypeScript type checker.
* @param expression - The expression to convert.
* @return The string representation of the expression or `undefined` if it couldn't be resolved.
*/
export declare const expressionToString: (checker: TypeChecker, expression: Expression) => string | undefined;