export const hasEnumFlag = ( flags: T, flag: T ): boolean => (flags & flag) === flag