effect-io-ai

Package: effect
Module: RcMap

RcMap.has

Returns whether the RcMap currently contains an entry for the specified key.

When to use

Use to check whether a key is already present in an RcMap without running the lookup function or acquiring a missing resource.

Details

This operation only checks the current map state.

Gotchas

Closed maps return false, so false does not distinguish a missing key from a closed map.

See

Signature

declare const has: { <K>(key: K): <A, E>(self: RcMap<K, A, E>) => Effect.Effect<boolean>; <K, A, E>(self: RcMap<K, A, E>, key: K): Effect.Effect<boolean>; }

Source

Since v3.17.7