I am a TypeScript beginner and I am doing some project with TypeScript + Angular 1.
So far, I have some services defined, each with the following structure:
/// <reference path="../App.ts"/>
module SomeModule {
export class SomeService {
constructor(...) {
...
}
}
var app = AppModule.getModule();
app.service("SomeService", SomeService);
}
where my App.ts is:
module AppModule{
'use strict';
angular.module('SomeApp', [...]);
export var getModule:() => ng.IModule = () => {
return angular.module('SomeApp');
};
}
And whenever I am trying to reference service that has a different module name, I need to include:
import SomeService = SomeModule.SomeService;
My question comes to: is there a way to omit those imports? Or store them in one file, so that I can later only reference one file instead of referencing all of the services which have different modules?
Thanks!