import { isRecord } from '@ankhorage/utility/object'; /** Stable keyed entities whose collection identity is carried by the record key. */ export type EntityRegistry< TKey extends string, TValue, TIdentityField extends Extract = never, > = Readonly> & Readonly>; /** Keyed configuration/property values whose key is part of the value's meaning. */ export type ValueMap = Readonly>; export type SerializableSet = Readonly>>; /*** Validate the canonical JSON-safe representation for unordered string membership. */ export function isSerializableSet(value: unknown): value is SerializableSet { return isRecord(value) && Object.values(value).every((member) => member === true); }