CommonHas
Callable
Parameters
obj: { has: (key) => boolean }
The set or map in question
has: (key) => boolean
key: unknown
The key to search for
Returns key is T
Whether the object contains the passed key
The set or map in question
The key to search for
Whether the object contains the passed key
A Set.has/Map.has version annotated to return a type guard.