isInstance<C>(arg, constructor): arg is InstanceType<C>
Determines whether an argument is an instance of a constructor, including subclasses.
This is done by first just checking instanceof,
and then comparing the string names of the constructors if that fails.
Determines whether an argument is an instance of a constructor, including subclasses. This is done by first just checking
instanceof
, and then comparing the string names of the constructors if that fails.