react-docgen
Version:
A library to extract information from React components for documentation generation.
8 lines (7 loc) • 297 B
TypeScript
import type { NodePath } from '@babel/traverse';
/**
* Given a path (e.g. call expression, member expression or identifier),
* this function tries to find the name of module from which the "root value"
* was imported.
*/
export default function resolveToModule(path: NodePath): string | null;