See this example: https://flowtype.org/try/#0C4TwDgpgBAglC8UDepIC4oCICGmA0U2GAzsAE4CWAdgOYC+AUKtAEILLMaYBG+U3JctXpNw0AKrs4AHygsGDAMYB7KqUICokxCjFdcBIllyMGFAGZQAFNm4A6ZgniIemAJTIGUKAHofUZkUACwhFAGtiKBUyMlDgABsQLw07bgZTFTVgDjE6dlszSytHZxdeDyRkvyjsKkBMAmzsYmIIMmzgIOxG7igKSPlvW1T0hUz1ZgAmfPtmQutJpzL3T29qxVqGwmbW9s7u3v6oCAoO1uShtLogA Using `if (ab.type)` directly works, while binding it to a var like `const {type} = ab; if (type)` results in a type error
Activity
calebmer commentedon Jul 31, 2017
We are going to keep this behavior for now. If you want to add support for this we can discuss 👍