facebook / facebook/flow

destructuring catch parameter throws Error

Open
#6,636 0 comments 0 reactions 0 assignees View on GitHub
bug destructuring Has PR
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

```javascript
function test() {
try {
//
} catch ({ message }) { // Unsupported catch parameter declaration.
//
}
}
```

https://flow.org/try/#0GYVwdgxgLglg9mABFApgZygCgJSIN4BQixyATgJ75EnED0t1xAvohAIZQQAWimeiAW3Ro2AcxSImuQjToMaTAkyA

not sure if this is related:

```javascript
function test() {
try {
//
} catch (err: { message: string }) { // Type annotations for catch parameters are not yet supported
//
}
}
```

https://flow.org/try/#0GYVwdgxgLglg9mABFApgZygCgJSIN4BQixyATgJ75EnED0t1xAvohAIZQQAWimKppAFz5EAW3Ro2AcxTCMpGGClNchGnQY0mBJkA

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.