Creates the error.
Optionalmessage: string
What went wrong, in the form Class.method: problem.
Marks instances of this class so instanceof recognises them across copies of the package.
Its key is not exported, so the getter is not called directly. Time: O(1).
Static[hasReturns whether value is an instance of this class, including instances created by another
copy of the library with the same major version.
Time: O(1); O(prototype-chain depth) when evaluated against a subclass.
The value on the left of instanceof.
true when value carries this class's brand; when evaluated against a subclass,
true when the subclass's prototype is in value's prototype chain.
Thrown when a collection does not support the requested operation, such as a change to a read-only collection.
Extends
TypeError. Match it withinstanceof, not bynameor message text: the message names the method and the problem, but its wording may change in any release.Time: O(1) to construct, plus the runtime's stack capture.
Example