near-api-js icon indicating copy to clipboard operation
near-api-js copied to clipboard

In 0.44.2 'headers' property is required in ConnectConfig

Open piontkovsk11andre1 opened this issue 3 years ago • 1 comments

After switching to 0.44.2 got error for connect function.

`Property 'headers' is missing in type '

{ ... }

' but required in type 'ConnectConfig'.`

near-api-js/lib/near.d.ts:

/**

  • NEAR RPC API headers. Can be used to pass API KEY and other parameters.

  • @see {@link JsonRpcProvider.JsonRpcProvider | JsonRpcProvider}

    */ headers:

    { [key: string]: string | number; }

    ;

It's neither described in the connect module documentation nor ConnectConfig type description.

piontkovsk11andre1 avatar Apr 11 '22 13:04 piontkovsk11andre1

Pass to Application Team

ailisp avatar May 09 '22 06:05 ailisp

Fixed in https://github.com/near/near-api-js/pull/939

marcinbodnar avatar Aug 24 '22 19:08 marcinbodnar