import { ArgumentInfo, NgDirectiveMetadata, NgDocItemType, NgPipeMetadata } from '../types'; import { ts } from '../typescript'; /** * Use a preconfigured TypeScript "printer" to render the text of a node, without comments. */ export declare function nodeToString(typeNode: ts.Node): string; export declare function normalizeNodeText(text: string): string; export declare function getNodeText(node: ts.Node): string; export declare function serializeSymbol(symbol: ts.Symbol, checker: ts.TypeChecker): { name: string; description: string; type: string; }; export declare function getNgDocItemType(name: string): NgDocItemType; export declare function getDirectiveMeta(args: ArgumentInfo[]): NgDirectiveMetadata; export declare function getPipeMeta(args: ArgumentInfo[]): NgPipeMetadata; export declare function getTypeNodes(typeNodes: ts.NodeArray): (string | number)[]; export declare function isExported(node: TNode): node is TNode; export declare function isExportedClassDeclaration(node: ts.Node): node is ts.ClassDeclaration; /** * Find all nodes from the AST in the subtree of node of SyntaxKind kind. * @param node * @param kind * @param max The maximum number of items to return. * @param recursive Continue looking for nodes of kind recursive until end * the last child even when node of kind has been found. * @return all nodes of kind, or [] if none is found */ export declare function findNodes(node: ts.Node, kind: ts.SyntaxKind, max?: number, recursive?: boolean): ts.Node[]; /** * Find all nodes from the AST in the subtree that satisfy a type guard. * @param node * @param guard * @param max The maximum number of items to return. * @param recursive Continue looking for nodes of kind recursive until end * the last child even when node of kind has been found. * @return all nodes that satisfy the type guard, or [] if none is found */ export declare function findNodes(node: ts.Node, guard: (node: ts.Node) => node is T, max?: number, recursive?: boolean): T[]; /** * Get all the nodes from a source. * @param sourceFile The source file object. * @returns {Array} An array of all the nodes in the source. */ export interface DocTagResult { description?: ts.JSDocTagInfo; default?: ts.JSDocTagInfo; deprecated?: ts.JSDocTagInfo; name?: ts.JSDocTagInfo; type?: ts.JSDocTagInfo; order?: ts.JSDocTagInfo; [key: string]: ts.JSDocTagInfo; } export interface MethodDocTagResult { description?: ts.JSDocTagInfo; default?: ts.JSDocTagInfo; deprecated?: ts.JSDocTagInfo; return?: ts.JSDocTagInfo; param?: Record; } export declare function getDocTagsBySymbol(symbol: ts.Symbol): [DocTagResult, Record]; export declare function parseJsDocTagsToDocTagResult(tags: (ts.JSDocTagInfo | undefined)[]): [DocTagResult, Record]; export declare function getTextByJSDocTagInfo(tag: ts.JSDocTagInfo, defaultValue: string): string; /** * 标记为 private 或者 internal 的 Tag */ export declare function hasPrivateTag(tags: DocTagResult): boolean; /** * 标记为公开的 Tag */ export declare function hasPublicTag(tags: DocTagResult): boolean; export declare function getDocTagsBySignature(symbol: ts.Signature): MethodDocTagResult; export declare function serializeMethodParameterSymbol(symbol: ts.Symbol, checker: ts.TypeChecker, tags: MethodDocTagResult): { name: string; description: string; type: string; }; //# sourceMappingURL=utils.d.ts.map