UNPKG

673 BTypeScriptView Raw
1import type { TypeParameters } from '../utils/getTypeParameters.js';
2import type { TypeDescriptor, TSFunctionSignatureType } from '../Documentation.js';
3import type { NodePath } from '@babel/traverse';
4import type { TypeScript } from '@babel/types';
5/**
6 * Tries to identify the typescript type by inspecting the path for known
7 * typescript 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 getTSType(path: NodePath<TypeScript>, typeParamMap?: TypeParameters | null): TypeDescriptor<TSFunctionSignatureType>;