1 | import type { NodePath } from '@babel/traverse';
|
2 | import type { Expression, PrivateName } from '@babel/types';
|
3 | interface MemberDescriptor {
|
4 | path: NodePath<Expression | PrivateName>;
|
5 | computed: boolean;
|
6 | argumentPaths: NodePath[];
|
7 | }
|
8 | /**
|
9 | * Given a "nested" Member/CallExpression, e.g.
|
10 | *
|
11 | * foo.bar()[baz][42]
|
12 | *
|
13 | * this returns a list of "members". In this example it would be something like
|
14 | * [
|
15 | * {path: NodePath<bar>, arguments: NodePath<empty>, computed: false},
|
16 | * {path: NodePath<baz>, arguments: null, computed: true},
|
17 | * {path: NodePath<42>, arguments: null, computed: false}
|
18 | * ]
|
19 | */
|
20 | export default function getMembers(path: NodePath, includeRoot?: boolean): MemberDescriptor[];
|
21 | export {};
|