I'm trying to use this but the compiler is producing the following:
Client.ts(2,5): error TS2134: Subsequent variable declarations must have the same type.
Variable 'XMLHttpRequest' must be of type '{ prototype: XMLHttpRequest; LOADING: number;
DONE: number; UNSENT: number; OPENED: number; HEADERS_RECEIVED: number; new():
XMLHttpRequest; }', but here has type 'any'.
For reference the line producing the error is:
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
Am I right in assuming that this is because node.d.ts doesn't have a definition for this module? If so how would I go about implementing the definition, the bit that has me confused is the prototype and new() having type XMLHttpRequest. Is this a recursive reference or will say an empty class declaration suffice?