Just starting out with TypeScript and running into issues while trying to load an es6 javascript module.
Here's the code snippet from my javascript file:
//TemplateFactory.js
export class TemplateFactory{
static getTemplate(module){
}
}
In addition, I've also created a d.ts file for this module:
//TemplateFactory.d.ts
declare module "TemplateFactory" {
export class TemplateFactory {
static getTemplate(module);
}
}
However, upon importing the js module in another ts file, I encounter the following error:
Error: File ....TemplateFactory .d.ts is not recognized as a module
Any insights on what might be going wrong here? Working with TypeScript version 1.8.