export class BitField<Flags extends string, Type extends number | bigint = number>
Data structure that makes it easy to interact with a bitfield.
Constructors
bits?: BitFieldResolvable<Flags, Type>)
constructor(bits?: BitFieldResolvable<Flags, Type>
[Symbol.iterator]IterableIterator<Flags> () :
add...bits: BitFieldResolvable<Flags, Type>[]) : BitField<Flags, Type> (
...bits: BitFieldResolvable<Flags, Type>[]
Adds bits to these ones.
Returns: These bits or new BitField if the instance is frozen.
anybit: BitFieldResolvable<Flags, Type>) : boolean (
bit: BitFieldResolvable<Flags, Type>
Checks whether the bitfield has a bit, or any of multiple bits.
equalsbit: BitFieldResolvable<Flags, Type>) : boolean (
bit: BitFieldResolvable<Flags, Type>
Checks if this bitfield equals another
hasbit: BitFieldResolvable<Flags, Type>) : boolean (
bit: BitFieldResolvable<Flags, Type>
Checks whether the bitfield has a bit, or multiple bits.
missingbits: BitFieldResolvable<Flags, Type>...hasParams: readonly unknown[]) : Flags[] (
bits: BitFieldResolvable<Flags, Type>
...hasParams: readonly unknown[]
Gets all given bits that are missing from the bitfield.
remove...bits: BitFieldResolvable<Flags, Type>[]) : BitField<Flags, Type> (
...bits: BitFieldResolvable<Flags, Type>[]
Removes bits from these.
Returns: These bits or new BitField if the instance is frozen.
Resolves bitfields to their numeric form.
Gets an object mapping field names to a boolean indicating whether the bit is available.