8

I am trying to write a TCP client application, and for that the builtin 'net' package seems to do the job. However, I am not able to find the TypeScript definitions for the package.

https://nodejs.org/api/net.html

Since it is built into NodeJs, I am almost sure it exists, but it cannot find any information about it anywhere.

Thanks!

1 Answer 1

23

They are available in the official typings for node. Install it with npm install @types/node --save-dev and you can import it in your TypeScript code using: import * as net from "net";

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.