Skip to content

destructuring catch parameter throws Error #6636

Open
@dnalborczyk

Description

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

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