Function flags

    • Writable Flags from variadic bit names (bit i = the i-th name), or from an object of name→default (keys are the bits in insertion order).

      Type Parameters

      • const N extends readonly string[]

      Parameters

      • ...names: N

      Returns Writable<Flags<N[number]>>

    • Writable Flags from variadic bit names (bit i = the i-th name), or from an object of name→default (keys are the bits in insertion order).

      Type Parameters

      • const R extends Record<string, boolean>

      Parameters

      • defaults: R

      Returns Writable<Flags<keyof R & string>>