ReadonlyaliasA computed, human-readable alias for the flag combination.
0n), returns "EMPTY_FLAG"."[READ]"."[READ+WRITE]".ReadonlyvalueThe raw BigInt bitmask representing the combined flags in this instance.
This value is read-only and reflects the bitwise OR of all set flags.
Adds one or more flag keys to this flag combination, creating a new instance with the updated bitmask.
One or more flag keys to add.
A new Flag instance with the added flags, or the current instance if unchanged.
Tests whether a specific flag key is set in this flag combination.
Performs a bitwise AND between the instance's value and the bitmask of the given flag key.
Returns false if the key is not found in the registry.
The flag key to check (must be a valid key in the registry).
true if the flag is set, false otherwise.
Checks if this flag instance represents no set flags (i.e., the bitmask value is 0n).
true if the flag is empty, false otherwise.
Removes one or more flag keys from this flag combination, creating a new instance with the updated bitmask.
One or more flag keys to remove.
A new Flag instance with the removed flags, or the current instance if unchanged.
Returns a human-readable string representation of this flag instance.
The format is Flag(${alias}: ${value}), where alias is the computed alias (e.g., [READ+WRITE])
and value is the raw BigInt bitmask.
A string like Flag([READ+WRITE]: 3).
Represents a bitwise combination of flags from a registry. This class encapsulates a bitmask value derived from one or more flag keys, enabling efficient storage and manipulation of boolean states (e.g., permissions, features, or configurations) using bitwise operations.