As I delve into TypeScript, a realm unfamiliar yet not entirely foreign due to my background in OO Design, confusion descends upon me like a veil.
Within the confines of file application.ts, a code structure unfolds:
class APPLICATION {
constructor(){
console.log("constructor APPLICATION")
this.database = new REPOSITORY
}
database: REPOSITORY
}
new APPLICATION
import { REPOSITORY } from "./repository"
Turning towards file repository.ts, another segment of code materializes:
export class REPOSITORY {
constructor() {
console.log("constructor de REPOSITORY")
}
}
Nevertheless, an error disrupts the harmony:
this.database = new repository_1.REPOSITORY;
^
<<TypeError: Cannot read property 'REPOSITORY' of undefined
at new APPLICATION (Z:\Documents\Phi\Developpement\TypeScript\test\application.js:6:41)>>
Lost in a maze of uncertainties, any flicker of an idea would be greatly appreciated.