@jaricardodev/ews-javascript-api
Version:
EWS Managed api in JavaScript
18 lines (15 loc) • 481 B
text/typescript
import { IXHROptions, IXHRApi } from "./Interfaces";
import { XHRDefault } from "./XHRDefault"
export class XHRFactory {
static xhrHelper: IXHRApi;
static get XHRApi() {
if (typeof this.xhrHelper === 'undefined' || this.xhrHelper === null) {
this.xhrHelper = new XHRDefault();
}
return this.xhrHelper;
}
public static newXHRApi() {
console.warn("depricated, import and use \"new XHRDefault(options?)\" instead")
return new XHRDefault();
}
}