import { ReadonlyBitField } from '@src/api/entities/bitfield/ReadonlyBitField' ; import { BitFieldResolvable } from '@src/api' ; import { resolveBitField } from '@src/utils/resolve' ; export abstract class BitField extends ReadonlyBitField { public bitfield ! : number ; add ( bits ) { this . bitfield |= ( this . emptyBit | resolveBitField ( bits ) ) ; return this ; } remove ( bits ) { this . bitfield &= ( ~ ( this . emptyBit | resolveBitField ( bits ) ) ) ; return this ; } }