Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Type issue with https.Agent

Since @types/node v22.15.34 we get the following error when trying to compile our library:

redacted/path/file.js(L,C): error TS2339: Property 'session' does not exist on type 'NetConnectOpts'.
  Property 'session' does not exist on type 'TcpNetConnectOpts'.
redacted/path/file.js(L,C): error TS2339: Property 'servername' does not exist on type 'NetConnectOpts'.
  Property 'servername' does not exist on type 'TcpNetConnectOpts'.

This issue can be reproduced using this repo as follows:

  1. Install dependencies
npm i
  1. Compile
$ npx tsc index.ts

index.ts:9:13 - error TS2339: Property 'servername' does not exist on type 'NetConnectOpts'.
  Property 'servername' does not exist on type 'TcpNetConnectOpts'.

9     options.servername = 'hello';
              ~~~~~~~~~~

index.ts:10:13 - error TS2339: Property 'session' does not exist on type 'NetConnectOpts'.
  Property 'session' does not exist on type 'TcpNetConnectOpts'.

10     options.session = Buffer.from('hello');
               ~~~~~~~


Found 2 errors in the same file, starting at: index.ts:9

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages