Files
Shifted/node_modules/react-docgen/dist/utils/getPropertyValuePath.d.ts
2026-02-10 01:14:19 +00:00

9 lines
475 B
TypeScript

import type { NodePath } from '@babel/traverse';
import type { Expression, ObjectExpression, ObjectMethod } from '@babel/types';
/**
* Given an ObjectExpression, this function returns the path of the value of
* the property with name `propertyName`. if the property is an ObjectMethod we
* return the ObjectMethod itself.
*/
export default function getPropertyValuePath(path: NodePath<ObjectExpression>, propertyName: string): NodePath<Expression | ObjectMethod> | null;