Currently, I am utilizing tsd to fetch definitions from Definitely Typed and generate a tsd.d.ts file through compilation. Although I have not yet been successful in building, I did notice that when I use an import statement like this:
import * as THREE from "three"
Visual Studio intellisense functions properly with this import. Nevertheless, the same does not apply to Detector.js (a three.js library designed for webgl support detection) accompanied by this .d.ts file. One notable disparity I observed is that the three.d.ts file exports a module (THREE), while detector.d.ts only exports an object:
three.d.ts
...
declare module 'three' {
export=THREE;
}
detector.d.ts
interface DetectorStatic {
canvas: boolean;
webgl: boolean;
workers: boolean;
fileapi: boolean;
getWebGLErrorMessage(): HTMLElement;
addGetWebGLMessage(parameters?: {id?: string; parent?: HTMLElement}): void;
}
declare var Detector: DetectorStatic;
Given this difference, should my approach to importing Detector be altered?