react-docgen
Version:
A library to extract information from React components for documentation generation.
8 lines (7 loc) • 329 B
TypeScript
import type { NodePath } from '@babel/traverse';
/**
* Given an React component (stateless or class) tries to find the
* flow or ts type for the props. If not found or not one of the supported
* component types returns undefined.
*/
export default function resolveGenericTypeAnnotation(path: NodePath): NodePath | undefined;