Skip to content

destructuring catch parameter throws Error #6636

Description

@dnalborczyk
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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions