In my Typescript classes, the structure often resembles this:
class WordService implements IWordService {
wordCreatedById: number = 0;
wordModifiedById: number = 0;
static $inject = [
"$http",
"$q",
...
];
constructor(
public $http: ng.IHttpService,
public $q: ng.IQService,
...
) {
}
wordClear = (): void => {
this.word = null;
this.wordBase = null;
}
...
}
As I continue to add more functions like wordClear, my class files have grown quite lengthy.
I am now wondering if there is a way for me to separate these functions into another file and then import them back into my class?