Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destructuring catch parameter throws Error #6636

Open
dnalborczyk opened this issue Jul 25, 2018 · 0 comments · May be fixed by #7990
Open

destructuring catch parameter throws Error #6636

dnalborczyk opened this issue Jul 25, 2018 · 0 comments · May be fixed by #7990

Comments

@dnalborczyk
Copy link
Contributor

dnalborczyk commented Jul 25, 2018

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

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

not sure if this is related:

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants