MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
940 stars 278 forks source link

Error build incorretly extends interface #631

Closed AlexandreSantos76 closed 5 months ago

AlexandreSantos76 commented 9 months ago

Expected Behavior:

When running the TypeScript build using the following command:


`$ NODE_OPTIONS='--max-old-space-size=3072' tsc --project tsconfig.json && tsc-alias -p tsconfig.json`

I expected the compilation to complete successfully with the message "done."

Actual Behavior:

During the TypeScript build, I encountered the following error, and the build process did not complete successfully:
`node_modules/shopify-api-node/node_modules/@szmarczak/http-timer/dist/source/index.d.ts:25:18 - error TS2430: Interface 'ClientRequestWithTimings' incorrectly extends interface 'ClientRequest'.
  The types returned by 'setTimeout(...)' are incompatible between these types.
    Type 'ClientRequest' is not assignable to type 'this'.
      'ClientRequest' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'ClientRequest'.

25 export interface ClientRequestWithTimings extends ClientRequest {
                    ~~~~~~~~~~~~~~~~~~~~~~~~
`
Environment:

TypeScript Version: 4.8
Node.js Version: 18
Shopify API Node.js Library Version: latest
Operating System: Ubuntu
lpinca commented 9 months ago

It seems there is not much we can do as the issue is raised in a transitive dependency.