TypeScript Basic Custom Error Class

Descripción

Define a basic custom Error class with a message constructor


File Template: ❌


Prefix

ex:class-runtime


Scopes

typescript


Snippet de código

class ${1:MyCustomError} extends Error {
	constructor(message: string) {
		super(message);
		this.name = "${1:MyCustomError}";
	}
}