I'm having a bit of trouble figuring out how to write a type definition for the following code. I guess the best way to describe it is a static class that contains a named constructor.
var ajaxAdapter = new IAjaxAdapter.implement({
ajax: function (work: IAjaxRequest) {
...
}
}
But I'm getting an build error Property 'implement' does not exist on type 'typeof IAjaxAdapter'.
My d.ts looks like this right now but obviously it's a bit wrong
export class IAjaxAdapterInstance {
constructor(any: any);
ajax: (request: IAjaxRequest) => void;
}
export class IAjaxAdapter {
implement: IAjaxAdapterInstance;
}
I'm not sure if this is possible, if not I guess I could any type it... but I was hoping for something.