I have the following problem, I currently have a project that has some files in typescript and others in javascript -
my folder structure is as follows For everything that is javascript, files .js
js/src
For everything that is typescript, files .ts
js/typescript
I have also configured my project so that everything that is as typescript is compiled into a folder
js/bin/compiled
For now I have two files siteController.ts
class SiteController {
eventManager:any;
constructor(message: string) {
this.eventManager = new EventManager(this);
}
}
and test.js
var test = function()
{
console.log("se ejecuto test");
}
var siteCOntroller = new SiteController("test");
Now, my problem is as follows If from test.js instancio siteController everything works fine, without throwing any error
If from siteController.ts I call the test () function; which is defined as seen in the file test.js
The compiler gives me the following error:
js/typescript/siteController.ts(6,9): error TS2304: Cannot find name 'test'.
I do not finish understanding where the problem is, as an example and if it is useful, leave my code here:
staging.mdiconcept.com/intercambio/dev_test_typescript_deploy.rar
Thank you very much