In TypeScript, there is no special value for the prototype property outside of the usual special value for the prototype property of JavaScript constructors.
In this code, the prototype property of the ErrorConstructor type / interface ErrorConstructor set to ensure that any code that accesses ErrorConstructor.prototype directly receives the correct type information for this property.
In contrast, the signature new ErrorConstructor defines the type of object created when new called. The return value of the new constructor and prototype constructor is nominally of the same type, but JavaScript allows constructors to return values ββthat are not of their own type, so the difference is necessary for the correct set of all possible JavaScript code.
source share