API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classFlags
Type-safe bitfield utility for managing sets of numeric enum flags. `T` should be a numeric const-enum or a type whose values are `number`. Internally stores the combined flags as a single 32-bit integer. Pass the enum TYPE as `T`, not `typeof MyEnum` - the reverse mapping of a numeric enum object carries string values and does not satisfy the constraint. Rest-argument methods (push, remove, has) allocate an array per call. On hot paths use the mask forms (addMask, removeMask, hasMask, popMask) with a pre-combined mask instead.
import { Flags } from '@codexo/exojs'Type-safe bitfield utility for managing sets of numeric enum flags.
`T` should be a numeric const-enum or a type whose values are `number`. Internally stores the combined flags as a single 32-bit integer.
Pass the enum TYPE as `T`, not `typeof MyEnum` - the reverse mapping of a numeric enum object carries string values and does not satisfy the constraint.
Rest-argument methods (push, remove, has) allocate an array per call. On hot paths use the mask forms (addMask, removeMask, hasMask, popMask) with a pre-combined mask instead.
new(flags: number[]): Flags<T>addMask(mask: number): thisclear(): thisdestroy(): voidhas(flags: V[]): booleanhasMask(mask: number): booleanpop(flag: V): booleanpopMask(mask: number): booleanpush(flags: V[]): thisremove(flags: V[]): thisremoveMask(mask: number): thisvalue: number