Found a temporary solution. It doesn't fix the bug though. You can wrap the first condition in parentheses.
type AA = {
a:? number,
b:? number,
c:? string,
}
const a: AA = {};
if((a.a !== undefined && a.b !== undefined) && a.c !== undefined) {
}
_This is better than ignoring bug with // @hegel-issue comment._
That's interesting (and sorry, off topic), the syntax c:? string, doesn't seem to be compatible with TS (not sure if that's a goal). In TS it is c?: string, (example).
@trusktr it's flow's syntax...
Do you guys like Flow better than TypeScript? (Just curious)
TypeScript seems to have higher usage, so if Hegel syntax is more aligned with TS, then easier for people to migrate to and adopt Hegel.
Most helpful comment
Do you guys like Flow better than TypeScript? (Just curious)
TypeScript seems to have higher usage, so if Hegel syntax is more aligned with TS, then easier for people to migrate to and adopt Hegel.