Export (0) Print
Expand All
Expand Minimize

JS1124: Only a constructor function can have the same name as the class it appears in

A method that is not a constructor has the same name as its class.

To correct this error

  1. Make the method a constructor by eliminating the return type and the return statements.

  2. Rename the method.

Community Additions

ADD
Show:
© 2015 Microsoft