2 ms·
nice writeup! // After export enum Options { None = 0, Flag1 = 1 << 0, Flag2 = 1 << 1, Flag3 = 1 << 2, TotalBits = 3, } i would recommend using `c
by leeoniya 3y ago
nice writeup!
// After
export enum Options {
None = 0, Flag1 = 1 << 0, Flag2 = 1 << 1, Flag3 = 1 << 2, TotalBits = 3,
}
i would recommend using `const enum` for performance, since it will get inlined.