Skip to content

Overwrite config of an instance with typescript (v3) #62

@zontafil

Description

@zontafil

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

Activity

jmdobry

jmdobry commented on Dec 12, 2016

@jmdobry
Member

I think it's a problem with js-data-http.d.ts. It's missing the definition for HttpAdapter#basePath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zontafil@jmdobry

        Issue actions

          Overwrite config of an instance with typescript (v3) · Issue #62 · js-data/js-data-http