Given the following:
/Admin/dialog/start.ts
/// <reference path="file1.ts" />
/// <reference path="file2.ts" />
module Admin.dialog {
export function x() { };
Admin.dialog.y();
Admin.dialog.z();
}
/Admin/dialog/file1.ts
module Admin.dialog {
export function y() { };
}
/Admin/dialog/file2.ts
module Admin.dialog {
export function z() { };
}
Is there some way that I could shorten the references or a way that I could declare in
another file the functions y() and z() so I would not have to refer to many reference
paths in the file start.ts?
For our current project we have one global .ts file that currently has 79 different reference paths in it. For the sake of this answer call it Global.ts
Then in our source files we have just 1 reference at the top, to Global.ts, and that in itself references everything else we need and it has worked fine so far.
Sometimes we need to reference Global.ts and a specific ts file in order for Visual Studio code-insight to work fully, but not all the time. We put this down to the immaturity of the VS TypeScript extension, as the code still builds fine, it’s just the VS completion that goes a bit awry.