Skip to main content

Function: isRefOfType()

function isRefOfType<T>(ref, refType): ref is Ref<T>;

Checks if a ref object is of a given ref type.

Type Parameters​

Type ParameterDescription
T extends objectReferenced object type.

Parameters​

ParameterTypeDescription
refRef<object>Reference object.
refTypeRefConstructor<T>Reference type.

Returns​

ref is Ref<T>

true if it is of the given type, false otherwise.