UNPKG

713 BTypeScriptView Raw
1import type { NodePath } from '@babel/traverse';
2import type Documentation from '../Documentation.js';
3import type { TypeParameters } from './getTypeParameters.js';
4/**
5 * Given an React component (stateless or class) tries to find
6 * flow or TS types for the props. It may find multiple types.
7 * If not found or it is not one of the supported component types,
8 * this function returns an empty array.
9 */
10declare const _default: (componentDefinition: NodePath) => NodePath[];
11export default _default;
12export declare function applyToTypeProperties(documentation: Documentation, path: NodePath, callback: (propertyPath: NodePath, params: TypeParameters | null) => void, typeParams: TypeParameters | null): void;