( path: unknown, key: TypeFilter<V>, )
| 3 | type TypeFilter<V extends t.Node> = (node: t.Node) => node is V; |
| 4 | |
| 5 | export function isPathValid<V extends t.Node>( |
| 6 | path: unknown, |
| 7 | key: TypeFilter<V>, |
| 8 | ): path is babel.NodePath<V> { |
| 9 | const node = (path as babel.NodePath).node; |
| 10 | return node ? key(node) : false; |
| 11 | } |
| 12 | |
| 13 | export type NestedExpression = |
| 14 | | t.ParenthesizedExpression |
no outgoing calls
no test coverage detected