I am new to TypeScript and trying to not get off to a bad start. Using TypeScript 2.5.3 within Visual Studio 2017 I am getting intellsense errors saying "Duplicate Identifier 'MyCo'". Am I doing something wrong here and if so how should I be doing this? The code runs as desired but VS intellisense is calling this an error.
MyCo.TestSuite1.ts
namespace MyCo {
export class TestSuite1 {
run() {
alert("MyCo.TestSuite1.run");
}
}
}
MyCo.TestSuite2.ts
namespace MyCo {
export class TestSuite2 {
run() {
alert("MyCo.TestSuite2.run");
}
}
}
App.ts
/// <reference path="MyCo.TestSuite1.ts" />
/// <reference path="MyCo.TestSuite2.ts" />
namespace MyCo {
export class Main {
run() {
var ts1 = new MyCo.TestSuite1();
ts1.run();
var ts2 = new MyCo.TestSuite2();
ts2.run();
}
}
}
(function () {
var main = new MyCo.Main();
main.run();
})();