Overview
The `TypeError` object
Last updated
The `TypeError` object
Last updated
TypeError {}
The TypeError
object is an extension of the CommonError
class and is thrown when an operation could not be performed, typically(but not exclusively) when a value is not of the expected type, with the message built from the described problem and its solution, optional an explicit identification and type, on the given or stored template.
public get : string
The accessor obtains error name of a type, set to 'TypeError'
that is being thrown.
public get : Type | undefined The accessor obtains the type of generic type variable that causes an error to be thrown(or not thrown) if set, otherwise returns .
public get : string
The accessor, with the help of , changes the default tag to 'TypeError'
for an instance of .
public static : string A template of the error message of type with the replaceable , and optional , , , tags.
: string Private property of the type that causes an error to be thrown(or not thrown).
public static : TypeError<Id, Type> Defines the instance with the built of the given required , and optional and on the given or stored .
public static : value is TypeError<Id, Type> Checks whether the of type is an instance of of any or the given and .