I want to ensure that my main.ts file is fully loaded and initialized before any other files, like my singleton files, are executed.
After using console.log()
, I have observed that my singletonExample.ts file is being run before main.ts. Is there a way to control the order of execution so that main.ts runs first?
The files in question contain typescript classes.
CODE EXAMPLE
main.ts
console.log('main');
singletonExample.ts
console.log("single");
//console result
single main