UNPKG

607 BTypeScriptView Raw
1import type { TypeParameters } from '../utils/getTypeParameters.js';
2import type { TypeDescriptor } from '../Documentation.js';
3import type { NodePath } from '@babel/traverse';
4import type { FlowType } from '@babel/types';
5/**
6 * Tries to identify the flow type by inspecting the path for known
7 * flow type names. This method doesn't check whether the found type is actually
8 * existing. It simply assumes that a match is always valid.
9 *
10 * If there is no match, "unknown" is returned.
11 */
12export default function getFlowType(path: NodePath<FlowType>, typeParams?: TypeParameters | null): TypeDescriptor;