Skip to content

Commit d3ea390

Browse files
authored
types: document Client and H2CClient option declarations (#4998)
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
1 parent 5334fa6 commit d3ea390

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

types/client.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export declare namespace Client {
3939
socketTimeout?: never;
4040
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
4141
requestTimeout?: never;
42-
/** TODO */
42+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
4343
connectTimeout?: number;
4444
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
4545
bodyTimeout?: number;
@@ -55,21 +55,21 @@ export declare namespace Client {
5555
keepAliveMaxTimeout?: number;
5656
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
5757
keepAliveTimeoutThreshold?: number;
58-
/** TODO */
58+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
5959
socketPath?: string;
6060
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
6161
pipelining?: number;
6262
/** @deprecated use the connect option instead */
6363
tls?: never;
6464
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
6565
strictContentLength?: boolean;
66-
/** TODO */
66+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
6767
maxCachedSessions?: number;
68-
/** TODO */
68+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
6969
connect?: Partial<buildConnector.BuildOptions> | buildConnector.connector;
70-
/** TODO */
70+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
7171
maxRequestsPerClient?: number;
72-
/** TODO */
72+
/** Local IP address the socket should connect from. */
7373
localAddress?: string;
7474
/** Max response body size in bytes, -1 is disabled */
7575
maxResponseSize?: number;

types/h2c-client.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export declare namespace H2CClient {
3232
maxHeaderSize?: number;
3333
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
3434
headersTimeout?: number;
35-
/** TODO */
35+
/** The timeout for establishing a socket connection, in milliseconds. Use `0` to disable it entirely. Default: `10e3` milliseconds (10s). */
3636
connectTimeout?: number;
3737
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
3838
bodyTimeout?: number;
@@ -42,19 +42,19 @@ export declare namespace H2CClient {
4242
keepAliveMaxTimeout?: number;
4343
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
4444
keepAliveTimeoutThreshold?: number;
45-
/** TODO */
45+
/** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
4646
socketPath?: string;
4747
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
4848
pipelining?: number;
4949
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
5050
strictContentLength?: boolean;
51-
/** TODO */
51+
/** Maximum number of TLS cached sessions used by the built-in connector. Use `0` to disable TLS session caching. Default: `100`. */
5252
maxCachedSessions?: number;
53-
/** TODO */
53+
/** Connector options passed to `buildConnector`, or a custom connector function. Default: `null`. */
5454
connect?: Omit<Partial<buildConnector.BuildOptions>, 'allowH2'> | buildConnector.connector;
55-
/** TODO */
55+
/** The maximum number of requests to send over a single connection before it is reset. Use `0` to disable this limit. Default: `null`. */
5656
maxRequestsPerClient?: number;
57-
/** TODO */
57+
/** Local IP address the socket should connect from. */
5858
localAddress?: string;
5959
/** Max response body size in bytes, -1 is disabled */
6060
maxResponseSize?: number;

0 commit comments

Comments
 (0)