assertSetSize
assertSetSize
Section titled “assertSetSize”Assert that a Set has exactly the expected size, with type narrowing.
import { assertSetSize } from "@kensio/smartass";
const value: unknown = new Set(["admin"]);
assertSetSize(value, 1);
// value is now narrowed to a Set with exactly 1 elementSource
Section titled “Source”Source file: src/assert/set-size/set-size.assert.ts
