Returns a new flag box with the specified flags toggled (bitwise XOR): absent flags are added, present flags are removed.
if any name is not registered.
const box = registry.of("read", "write");const result = toggle(box, "write", "execute");result.has("read"); // true — untouchedresult.has("write"); // false — was present, removedresult.has("execute"); // true — was absent, added Copy
const box = registry.of("read", "write");const result = toggle(box, "write", "execute");result.has("read"); // true — untouchedresult.has("write"); // false — was present, removedresult.has("execute"); // true — was absent, added
Returns a new flag box with the specified flags toggled (bitwise XOR): absent flags are added, present flags are removed.