Skip to content

Internal modules not loaded until file opened #67

@englercj

Description

@englercj

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions