I am having an issue with importing declarations from an extended file (I am using this typing). According to example, I should put this into my code:
import * as SockJS from 'sockjs-client';
import BaseEvent = __SockJSClient.BaseEvent;
import SockJSClass = __SockJSClient.SockJSClass;
However, when I try to do this as following:
module Test {
import * as SockJS from 'sockjs-client';
import BaseEvent = __SockJSClient.BaseEvent;
import SockJSClass = __SockJSClient.SockJSClass;
export class Example {
constructor() {......
}}}
I get the following error from the compiler:
error TS1147: Import declarations in a namespace cannot reference a module.
Am I doing something wrong? Or is there any issue with the typing itself?
Thanks
uksz


d.tsfile as/// <reference path="./sockjs-client.d.ts" />or in commontsd.d.tsand keep the import out of the module