UNPKG

485 BTypeScriptView Raw
1/**
2 * Helper functions to work with docblock comments.
3 */
4import type { NodePath } from '@babel/traverse';
5/**
6 * Given a path, this function returns the closest preceding docblock if it
7 * exists.
8 */
9export declare function getDocblock(path: NodePath, trailing?: boolean): string | null;
10/**
11 * Given a string, this functions returns an object with doclet names as keys
12 * and their "content" as values.
13 */
14export declare function getDoclets(str: string): Record<string, string>;