- has<Property>(property: Property): (<Actual>(object: Actual | Readonly<Record<Property, unknown>>) => object is Readonly<Record<Property, unknown>>)
-
Type Parameters
-
Property extends PropertyKey
Returns (<Actual>(object: Actual | Readonly<Record<Property, unknown>>) => object is Readonly<Record<Property, unknown>>)
-
- <Actual>(object: Actual | Readonly<Record<Property, unknown>>): object is Readonly<Record<Property, unknown>>
-
Parameters
-
object: Actual | Readonly<Record<Property, unknown>>
Returns object is Readonly<Record<Property, unknown>>
Curried wrapper for the
in
operator. Given aproperty
name and anobject
, returnstrue
the object contains that property,false
otherwise.Example
Returns
Curried function with
property
in context.