microsoft / vscode-mock-debug

Starter sample for developing debug adapters for VSCode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property does not exist from net.Server.address()

opened this issue · comments

Hello everyone,

The error occurs from the file extension.ts line 79
config.debugServer = this._server.address().port;

Error:

Property 'port' does not exist on type 'string | AddressInfo'. Property 'port' does not exist on type 'string'.

I went to the file index.d.ts and changed line 2841 from
address(): AddressInfo | string;
to
address(): AddressInfo;

And the error will disappear and everything works fine.
Could you please help me with this problem?
Thank you.

Here are some info:

VS Code

Version 1.22.2
Commit 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9
Date 2018-04-12T16:34:44.222Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

OS: ubuntu 18.04