Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[node] Add missing type definitions for net module #61871

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions types/node/net.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ declare module 'net' {
hints?: number | undefined;
family?: number | undefined;
lookup?: LookupFunction | undefined;
noDelay?: boolean | undefined;
keepAlive?: boolean | undefined;
keepAliveInitialDelay?: number | undefined;
}
interface IpcSocketConnectOpts extends ConnectOpts {
path: string;
Expand Down Expand Up @@ -399,6 +402,21 @@ declare module 'net' {
* @default false
*/
pauseOnConnect?: boolean | undefined;
/**
* Indicates whether to use nagle's algorithm.
* @default false
*/
noDelay?: boolean | undefined;
/**
* Indicates whether TCP keep-alive is enabled.
* @default false
*/
keepAlive?: boolean | undefined;
/**
* Indicates the initial delay in seconds before keep-alive probes are sent.
* @default 0
*/
keepAliveInitialDelay?: number | undefined;
}
/**
* This class is used to create a TCP or `IPC` server.
Expand Down