Coming from C# it is easily possible to have 2 classes, from separate files, referring to each other in a circular relationship. However now in (Node) JS, it appears to be causing issues.
The idea is that I have the following scenario:
// Parent.js
import {Child} from './Child.js'
export class Parent {
/** @type {Child} */
child
}
// Child.js
import {Parent} from './Parent.js'
export class Child {
/** @type {Parent} */
parent
}
Is it possible to retain this relationship, without merging the two files together, and resolve the circular dependency?