i'm new typescript , i'm having problem loading es6 javascript module.
i have following javascript file
//templatefactory.js export class templatefactory{ static gettemplate(module){ } }
and created following d.ts file
//templatefactory.d.ts declare module "templatefactory" { export class templatefactory { static gettemplate(module); } }
however when import js module in ts file error:
file ....templatefactory .d.ts not module
what doing wrong? i'm using typescript 1.8
i've managed solve this. here code worked me:
export declare class templatefactory { static gettemplate(module: any): void; }
Comments
Post a Comment