FunctionsCommonHasCommonHas CallableCommonHas<T>(obj: { has: (key: T) => boolean }, key: unknown): key is TA Set.has/Map.has version annotated to return a type guard.Type parametersTParametersobj: { has: (key: T) => boolean }The set or map in questionhas: (key: T) => booleankey: unknownThe key to search forReturns key is TWhether the object contains the passed key
A Set.has/Map.has version annotated to return a type guard.