Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript errors #36

Open
seanpertet opened this issue Oct 3, 2022 · 0 comments
Open

Typescript errors #36

seanpertet opened this issue Oct 3, 2022 · 0 comments

Comments

@seanpertet
Copy link

seanpertet commented Oct 3, 2022

On newer Typescript versions. The following errors are thrown on compilation

node_modules/@space48/bigcommerce-api/lib/management/v2/index.d.ts:8:101 - error TS2344: Type 'Request<ReqLine, Params>' does not satisfy the constraint 'Request<`DELETE ${string}` | `GET ${string}` | `PATCH ${string}` | `POST ${string}` | `PUT ${string}`, Parameters>'.
  Type 'Params' is not assignable to type 'Parameters'.

8 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@space48/bigcommerce-api/lib/management/v2/index.d.ts:8:64
    8 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                     ~~~~~~
    This type parameter might need an `extends Parameters` constraint.

node_modules/@space48/bigcommerce-api/lib/management/v2/index.d.ts:8:118 - error TS2344: Type 'Params' does not satisfy the constraint 'Parameters'.

8 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                                                                       ~~~~~~

  node_modules/@space48/bigcommerce-api/lib/management/v2/index.d.ts:8:64
    8 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                     ~~~~~~
    This type parameter might need an `extends Parameters` constraint.

node_modules/@space48/bigcommerce-api/lib/management/v3/index.d.ts:9:101 - error TS2344: Type 'Request<ReqLine, Params>' does not satisfy the constraint 'Request<`DELETE ${string}` | `GET ${string}` | `PATCH ${string}` | `POST ${string}` | `PUT ${string}`, Parameters>'.
  Type 'Params' is not assignable to type 'Parameters'.

9 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@space48/bigcommerce-api/lib/management/v3/index.d.ts:9:64
    9 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                     ~~~~~~
    This type parameter might need an `extends Parameters` constraint.

node_modules/@space48/bigcommerce-api/lib/management/v3/index.d.ts:9:118 - error TS2344: Type 'Params' does not satisfy the constraint 'Parameters'.

9 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                                                                       ~~~~~~

  node_modules/@space48/bigcommerce-api/lib/management/v3/index.d.ts:9:64
    9 export declare type InferResponse<ReqLine extends RequestLine, Params> = NarrowResponse<Operations, Request<ReqLine, Params>, Operations[ReqLine]['response']>;
                                                                     ~~~~~~
    This type parameter might need an `extends Parameters` constraint.


Found 4 errors in 2 files.

Errors  Files
     2  node_modules/@space48/bigcommerce-api/lib/management/v2/index.d.ts:8
     2  node_modules/@space48/bigcommerce-api/lib/management/v3/index.d.ts:9

We should look at fixing these to avoid a scenario where we end up sticking with an EOL version of Typescript due to not being able to upgrade because of the TS error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant