panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

Typescript - reference to dom and AbortSignal #433

Closed Luzgan closed 2 years ago

Luzgan commented 2 years ago

Describe the bug Typescript having problems with AbortSignal types, which I believe is a type from dom types. From what I see it was added in https://github.com/panva/node-openid-client/commit/2c1d2ab71fe2daba2dad23af1f92f66c92305df5 and removed in https://github.com/panva/node-openid-client/commit/d69af6fe28eb93dca8babad520d5e763aff7e6ff#diff-093ad82a25aee498b11febf1cdcb6546e4d223ffcb49ed69cc275ac27ce0ccceL2 but reference to AbortSignal type stayed in there.

Environment:

panva commented 2 years ago

AbortSignal is added as a global in Node.js 16, bumping your @types/node to 16.x will help out. I don't think I can make it so that you can stay on older versions.

Luzgan commented 2 years ago

Hm. Bumping types to 16, while using 12 seems wrong. I guess you should update readme, with a mention that node 16 is supported, nothing below.

panva commented 2 years ago

The supported runtimes are correct as-is. @types/node is not a runtime.

Luzgan commented 2 years ago

Fair enough, but maybe mention typescript problem at least :)