Javascript’s class inheritance is always difficult to achieve perfection.

  node.js, question
function inherit(SperClass, SubClass) {
 var name = SubClass.name;
 var Generated_by_OOP = function() {
 SperClass.apply(this, arguments);
 SubClass.apply(this, arguments);
 bracket
 Generated_by_OOP.prototype = $.extend(Object.create(new SperClass), SubClass.prototype);
 Generated_by_OOP.superClass = SperClass;
 return Generated_by_OOP;
 bracket

This is the class inheritance function I wrote.
But there is a flaw,new SperClassTo prevent it from reporting errors, there must be some restrictions on the constructor of this parent class.
In other words, the constructor of a class that wants to be used as a parent class must ensure that it cannot report an error without parameters.

Is there any way to eliminate this restriction?