UNPKG

react-docgen

Version:

A library to extract information from React components for documentation generation.

8 lines (7 loc) 350 B
import type { NodePath } from '@babel/traverse'; /** * Unwraps NodePaths from the builtin TS types `PropsWithoutRef`, * `PropsWithRef` and `PropsWithChildren` and returns the inner type param. * If none of the builtin types is detected the path is returned as-is */ export default function unwrapBuiltinTSPropTypes(typePath: NodePath): NodePath;