panva / openid-client

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

index.d.ts causing build error. #427

Closed lexyfeitopayrix closed 2 years ago

lexyfeitopayrix commented 2 years ago

Describe the bug When running tsc to build the project I get a build error coming from openid-client/types/index.d.ts.

node_modules/openid-client/types/index.d.ts:15:5 - error TS2344: Type '"timeout" | "lookup" | "headers" | "key" | "ca" | "cert" | "passphrase" | "pfx" | "agent" | "crl"' does not satisfy the constraint '"ho st" | "path" | "auth" | "timeout" | "headers" | "key" | "method" | "protocol" | "rejectUnauthorized" | "ca" | "cert" | "passphrase" | "pfx" | "createConnection" | "agent" | ... 25 more ... | "servername"'. Type '"lookup"' is not assignable to type '"host" | "path" | "auth" | "timeout" | "headers" | "key" | "method" | "protocol" | "rejectUnauthorized" | "ca" | "cert" | "passphrase" | "pfx" | "createConnectio n" | "agent" | ... 25 more ... | "servername"'.

And it is being caused by `export type HttpOptions = Partial<Pick<https.RequestOptions, | 'agent' | 'ca' | 'cert' | 'crl' | 'headers' | 'key' | 'lookup', | 'passphrase' | 'pfx' | 'timeout'

`

I am using "typescript": "^4.1.3",

Any idea what could cause this, any other information need to determine the problem?

Environment:

panva commented 2 years ago

Update your @types/node.

panva commented 2 years ago

Also. A duplicate of #424