// module1
const B = require("./module2")
module.exports = class A {
constructor() {}
static fun(){
B.func().....
}
}
// module2
const A = require("./module1")
module.exports = class B {
constructor(){}
static fun(){
A.fun()...
}
}
When i console typeof class 'B' from A instead of showing function it showing type as an object ie:-the class becoming an empty object {} how to access class methods correctly. It showing an error like
A.fun((...) => {
^
TypeError: Cannot read property 'fun' of undefined