JS1233: A constructor function may not have a return type

The constructor function of a class has a return type specified. However, a constructor function automatically returns a reference to the constructed class instance; it does not return a value.

To correct this error

  1. Remove the return type specification from the constructor.

  2. Change the constructor to a method by renaming the method with a name that is different from the class name.

Community Additions