Data structure that makes it easy to interact with a bitfield.
Name | Constraints | Optional | Default | Description |
---|---|---|---|---|
S | string | No | None | |
N | number | bigint | Yes | number | None |
Name | Type | Optional | Description |
---|---|---|---|
bits | BitFieldResolvable<S, N> | Yes | None |
Adds bits to these ones.
Returns
These bits or new BitField if the instance is frozen.Name | Type | Optional | Description |
---|---|---|---|
...bits | BitFieldResolvable<S, N>[] | No | Bits to add |
Checks whether the bitfield has a bit, or any of multiple bits.
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<S, N> | No | Bit(s) to check for |
Checks if this bitfield equals another
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<S, N> | No | Bit(s) to check for |
Freezes these bits, making them immutable.
Checks whether the bitfield has a bit, or multiple bits.
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<S, N> | No | Bit(s) to check for |
Gets all given bits that are missing from the bitfield.
Name | Type | Optional | Description |
---|---|---|---|
bits | BitFieldResolvable<S, N> | No | Bit(s) to check for |
...hasParams | readonly unknown[] | No | Additional parameters for the has method, if any |
Removes bits from these.
Returns
These bits or new BitField if the instance is frozen.Name | Type | Optional | Description |
---|---|---|---|
...bits | BitFieldResolvable<S, N>[] | No | Bits to remove |
Resolves bitfields to their numeric form.
Name | Type | Optional | Description |
---|---|---|---|
bit | BitFieldResolvable<string, number | bigint> | Yes | bit(s) to resolve |
Gets an object mapping field names to a indicating whether the bit is available.
Name | Type | Optional | Description |
---|---|---|---|
...hasParams | readonly unknown[] | No | Additional parameters for the has method, if any |
Gets an of bitfield names based on the bits available.
Name | Type | Optional | Description |
---|---|---|---|
...hasParams | readonly unknown[] | No | Additional parameters for the has method, if any |