Tests whether a value of type T extends AnyJson contains a property key of type JsonArray. If so, the
type of the tested value is narrowed to reflect the existence of that key for convenient access in the same scope.
Returns false if the property key does not exist on the object or the value stored by that key is not of type
JsonArray.
// type of obj -> unknown if (hasJsonArray(obj, 'body')) { // type of obj -> { body: JsonArray } }
Tests whether a value of type
T extends AnyJsoncontains a propertykeyof type JsonArray. If so, the type of the tested value is narrowed to reflect the existence of that key for convenient access in the same scope. Returnsfalseif the property key does not exist on the object or the value stored by that key is not of type JsonArray.