You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** the timeout after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
keepAliveTimeout?: number|null;
/** the maximum allowed `idleTimeout` when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
keepAliveMaxTimeout?: number|null;
/** A number subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
keepAliveTimeoutThreshold?: number|null;
/** 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`. */
/** The maximum length of request headers in bytes. Default: `16384` (16KiB). */
maxHeaderSize?: number|null;
/** 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). */
bodyTimeout?: number|null;
/** The amount of time the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
headersTimeout?: number|null;
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
strictContentLength?: boolean;
/** @deprecated use the connect option instead */
tls?: TlsOptions|null;
/** */
maxRequestsPerClient?: number;
/** Max response body size in bytes, -1 is disabled */
maxResponseSize?: number|null;
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
autoSelectFamily?: boolean;
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
I'm thinking of adding types for options.socketPath, but also noticed missing types for other parameters like options.socketTimeout, is it alright to include those?
Thanks.
The text was updated successfully, but these errors were encountered:
* update types for client
* update types for client.js
* revert some changes made in client.js
* update client.js
* use never for all @deprecated properties
* add tests
* revert since it's false anyways lol
* update types for client
* update types for client.js
* revert some changes made in client.js
* update client.js
* use never for all @deprecated properties
* add tests
* revert since it's false anyways lol
crysmags
pushed a commit
to crysmags/undici
that referenced
this issue
Feb 27, 2024
* update types for client
* update types for client.js
* revert some changes made in client.js
* update client.js
* use never for all @deprecated properties
* add tests
* revert since it's false anyways lol
Hi, thought of submitting a couple type fixes for the *.d.types to improve some VSCode IntelliSense.
For example,
Client.Options.socketPath
type is missing when the following lines use it:undici/lib/client.js
Line 103 in d04ec2b
undici/benchmarks/benchmark.js
Line 27 in d04ec2b
A question before I proceed, am I correct that the types below:
undici/types/client.d.ts
Lines 20 to 52 in d04ec2b
..are intended for the constructor below?
undici/lib/client.js
Lines 88 to 115 in d04ec2b
I'm thinking of adding types for
options.socketPath
, but also noticed missing types for other parameters likeoptions.socketTimeout
, is it alright to include those?Thanks.
The text was updated successfully, but these errors were encountered: