UNPKG

453 BTypeScriptView Raw
1import type { NodePath } from '@babel/traverse';
2import type { Node } from '@babel/types';
3/**
4 * Splits a MemberExpression or CallExpression into parts.
5 * E.g. foo.bar.baz becomes ['foo', 'bar', 'baz']
6 */
7declare function toArray(path: NodePath<Node | null>): string[];
8/**
9 * Creates a string representation of a member expression.
10 */
11declare function toString(path: NodePath<Node | null>): string;
12export { toString as String, toArray as Array };