Conditional types in flow

Viewed 3538

Is it possible to type a variable in flow based on a condition? Something like this:

const type = 'xyz';
const a: (type === 'xyz') ? number : string;
2 Answers
Related