@types/node
Advanced tools
Comparing version
@@ -84,15 +84,6 @@ /** | ||
/** | ||
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted | ||
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6 | ||
* addresses before IPv4 addresses. Default value is configurable using | ||
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). | ||
* @default `verbatim` (addresses are not reordered) | ||
*/ | ||
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined; | ||
/** | ||
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4 | ||
* addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified, | ||
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder} | ||
* addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder} | ||
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). | ||
* @default true (addresses are not reordered) | ||
* @default true | ||
*/ | ||
@@ -676,11 +667,10 @@ verbatim?: boolean | undefined; | ||
/** | ||
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* The value could be: | ||
* | ||
* * `ipv4first`: for `order` defaulting to `ipv4first`. | ||
* * `ipv6first`: for `order` defaulting to `ipv6first`. | ||
* * `verbatim`: for `order` defaulting to `verbatim`. | ||
* * `ipv4first`: for `verbatim` defaulting to `false`. | ||
* * `verbatim`: for `verbatim` defaulting to `true`. | ||
* @since v18.17.0 | ||
*/ | ||
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim"; | ||
export function getDefaultResultOrder(): "ipv4first" | "verbatim"; | ||
/** | ||
@@ -732,8 +722,7 @@ * Sets the IP address and port of servers to be used when performing DNS | ||
/** | ||
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* The value could be: | ||
* | ||
* * `ipv4first`: sets default `order` to `ipv4first`. | ||
* * `ipv6first`: sets default `order` to `ipv6first`. | ||
* * `verbatim`: sets default `order` to `verbatim`. | ||
* * `ipv4first`: sets default `verbatim` to `false`. | ||
* * `verbatim`: sets default `verbatim` to `true`. | ||
* | ||
@@ -745,5 +734,4 @@ * The default is `verbatim` and {@link setDefaultResultOrder} have higher | ||
* @since v16.4.0, v14.18.0 | ||
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. | ||
*/ | ||
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; | ||
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void; | ||
// Error codes | ||
@@ -750,0 +738,0 @@ export const NODATA: "ENODATA"; |
@@ -349,16 +349,16 @@ /** | ||
/** | ||
* Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be: | ||
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options). | ||
* The value could be: | ||
* | ||
* * `ipv4first`: sets default `order` to `ipv4first`. | ||
* * `ipv6first`: sets default `order` to `ipv6first`. | ||
* * `verbatim`: sets default `order` to `verbatim`. | ||
* * `ipv4first`: sets default `verbatim` to `false`. | ||
* * `verbatim`: sets default `verbatim` to `true`. | ||
* | ||
* The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) | ||
* have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). | ||
* When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder) | ||
* from the main thread won't affect the default dns orders in workers. | ||
* The default is `verbatim` and {@link setDefaultResultOrder} have higher | ||
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using | ||
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main | ||
* thread won't affect the default dns orders in workers. | ||
* @since v16.4.0, v14.18.0 | ||
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`. | ||
* @param order must be `'ipv4first'` or `'verbatim'`. | ||
*/ | ||
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void; | ||
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void; | ||
// Error codes | ||
@@ -365,0 +365,0 @@ const NODATA: "ENODATA"; |
@@ -24,4 +24,2 @@ /** | ||
GlobOptions, | ||
GlobOptionsWithFileTypes, | ||
GlobOptionsWithoutFileTypes, | ||
MakeDirectoryOptions, | ||
@@ -1249,12 +1247,3 @@ Mode, | ||
*/ | ||
function glob(pattern: string | string[]): AsyncIterableIterator<string>; | ||
/** | ||
* Retrieves the files matching the specified pattern. | ||
*/ | ||
function glob<Options extends GlobOptions>( | ||
pattern: string | string[], | ||
opt: Options, | ||
): Options extends GlobOptionsWithFileTypes ? AsyncIterableIterator<Dirent> | ||
: Options extends GlobOptionsWithoutFileTypes ? AsyncIterableIterator<string> | ||
: AsyncIterableIterator<Dirent> | AsyncIterableIterator<string>; | ||
function glob(pattern: string | string[], options?: GlobOptions): AsyncIterableIterator<string>; | ||
} | ||
@@ -1261,0 +1250,0 @@ declare module "node:fs/promises" { |
{ | ||
"name": "@types/node", | ||
"version": "22.0.0", | ||
"version": "22.0.1", | ||
"description": "TypeScript definitions for node", | ||
@@ -215,4 +215,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", | ||
}, | ||
"typesPublisherContentHash": "14d7e2fcf1f884d0f55bb00df1951b1b7f2ad5995765756491fdd7dca5fd256f", | ||
"typesPublisherContentHash": "812418de0c8a4d6f3dd51da81aeba50ecf77191b22dd1bb7c8f56be32e512105", | ||
"typeScriptVersion": "4.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Sun, 28 Jul 2024 10:07:16 GMT | ||
* Last updated: Wed, 31 Jul 2024 17:36:20 GMT | ||
* Dependencies: [undici-types](https://npmjs.com/package/undici-types) | ||
@@ -14,0 +14,0 @@ |
@@ -49,10 +49,2 @@ /** | ||
} | ||
interface FileUrlToPathOptions { | ||
/** | ||
* `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default. | ||
* @default undefined | ||
*/ | ||
windows?: boolean | undefined; | ||
} | ||
interface PathToFileUrlOptions extends FileUrlToPathOptions {} | ||
/** | ||
@@ -310,3 +302,3 @@ * The `url.parse()` method takes a URL string, parses it, and returns a URL | ||
*/ | ||
function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string; | ||
function fileURLToPath(url: string | URL): string; | ||
/** | ||
@@ -329,3 +321,3 @@ * This function ensures that `path` is resolved absolutely, and that the URL | ||
*/ | ||
function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL; | ||
function pathToFileURL(path: string): URL; | ||
/** | ||
@@ -332,0 +324,0 @@ * This utility function converts a URL object into an ordinary options object as |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2080318
-0.17%46696
-0.15%