What do you think about this code snippet?
/**
* Bitmask of states
*/
export const enum ViewState {
FirstCheck = 1 << 0, // result is 1
ChecksEnabled = 1 << 1, // result is 2
Errored = 1 << 2, // result is 4
Destroyed = 1 << 3 // result is 8
}
I'm curious why the integer results were not explicitly stated as numbers 0,1,2,3
. Any thoughts on this approach?