UNPKG

398 BTypeScriptView Raw
1import type { NodePath } from '@babel/traverse';
2import type { Expression, MemberExpression } from '@babel/types';
3/**
4 * Returns the path to the first part of the MemberExpression. I.e. given a
5 * path representing
6 *
7 * foo.bar.baz
8 *
9 * it returns the path of/to `foo`.
10 */
11export default function getMemberExpressionRoot(memberExpressionPath: NodePath<MemberExpression>): NodePath<Expression>;