UNPKG

513 BTypeScriptView Raw
1import { NodePath } from 'ast-types/lib/node-path';
2/**
3 * Helper functions to work with docblock comments.
4 */
5/**
6 * Extracts the text from a docblock comment
7 * @param {rawDocblock} str
8 * @return str stripped from stars and spaces
9 */
10export declare function parseDocblock(str: string): string;
11/**
12 * Given a path, this function returns the closest preceding docblock if it
13 * exists.
14 */
15export default function getDocblock(path: NodePath, { commentIndex }?: {
16 commentIndex?: number;
17}): string | null;