T3S icon indicating copy to clipboard operation
T3S copied to clipboard

Internal modules not loaded until file opened

Open englercj opened this issue 11 years ago • 0 comments

I have a file that looks like this:

src/ts/Module.ts:

module MyModule {
    export class MyClass {

        constructor() {
            var boot = new States.Boot();
        }

    }
}

and another

src/ts/states/Boot.ts:

module MyModule.States {
    export class Boot {

        constructor() {
        }

    }
}

The problem I am encountering is that if I open Module.ts I have an error saying it cannot resolve States.Boot. If I then open the Boot.ts file, the other file will resolve the symbol correctly. Unfortunately, this means every time I open this project in sublime I basically have to open all files so that internal module usage works properly.

This happens on the dev branch. I don't want to use explicit requires (var Boot = require(...)). Is there any way whatever process needs to run to load each module's data can happen on project load instead of lazily when the file is opened?

englercj avatar Aug 18 '14 01:08 englercj