Hyperlinkv0.8.0-beta.28

HashRing

HashRing.isHashRingconsteffect/HashRing.ts:71
(u: unknown): u is HashRing<any>

Checks whether a value is a HashRing.

When to use

Use to narrow an unknown value before treating it as a HashRing, such as values crossing an untyped boundary.

Details

The guard checks for the module's internal TypeId property and narrows to HashRing<any>.

Gotchas

This is a structural type-id check; it does not validate the ring's nodes, ring, or weight state.

Source effect/HashRing.ts:711 lines
export const isHashRing = (u: unknown): u is HashRing<any> => hasProperty(u, TypeId)
Referenced by 2 symbols