flow
flow copied to clipboard
Singleton number types do not support negative numbers
var star_rating: 0 | 1 | 2 | 3 | 4 | 5 = 0; // ok
var direction: 1 | 0 | -1 = 1; // fails
Saying +1 instead of 1 will also generate an error.