facebook / facebook/jscodeshift

Find does not traverse ObjectPattern's TypeAnnotation

Open
#175 0 comments 0 reactions 0 assignees View on GitHub
upstream
Dominant language
JavaScript
Stars
10k
Forks
498
PR merge metrics
No merged PRs in 30d

Description

This probably has the same root cause as issue #34 , but I thought I'd flag it just in case:

`find` seems to have trouble searching through type annotations of object patterns. It can't find the identifier T, nor the `TypeAnnotation` here:

```
function f({x}: {x: T}) {}
```

But it can find both without the `ObjectPattern`:

```
function f(obj: {x: T}) {}
```

Example: http://astexplorer.net/#/tHx2YYTvvd/1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.