We help IT Professionals succeed at work.

Calling constructor in javascript ES6 class

sduser1
sduser1 asked
on
Hi,

I have one file which is written in traditional javascript. Trying to convert the file to ES6 class. Sending both the files. I am getting error on calling the function in the constructor.

Please check.

Error:
 Error: TypeError: mechanics.Debug.apply is not a function
baseClass.txt
TraditionalJS.txt
ES6Format.txt
Comment
Watch Question

Commented:
using
module.exports = DebugMechanic in the base class

and extends mechanics.debug worked.