Skip to content

Conversation

goodmind
Copy link
Contributor

@goodmind goodmind commented Aug 5, 2019

Fixes #6636

I also moved location of error to be more accurate when there is type annotation

@goodmind goodmind changed the title Add destructuring to catch Add destructuring to catch clause Aug 5, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@panagosg7 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@goodmind
Copy link
Contributor Author

goodmind commented Aug 6, 2019

Not sure if this is considered type annotation?

try {

} catch ({message = 'foo'}) {
  message // type is string
}

@goodmind
Copy link
Contributor Author

/cc @panagosg7 anything here?

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

Successfully merging this pull request may close these issues.

destructuring catch parameter throws Error
2 participants