js-data-http
js-data-http copied to clipboard
Overwrite config of an instance with typescript (v3)
hello, I'm trying to change the http config (specifically the headers) after the adapter is instantiated. I'm trying something like:
let adapter = new HttpAdapter({});
adapter.httpConfig = {headers: {}};
adapter.basePath = "test";
which results in "Property 'basePath' does not exist on type 'HttpAdapter'."
I can solve by setting the type of adapter to "any". Is there a better solution?
thanks
I think it's a problem with js-data-http.d.ts
. It's missing the definition for HttpAdapter#basePath