Socket
Socket
Sign inDemoInstall

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1916
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node - npm Package Compare versions

Comparing version 20.12.12 to 20.12.13

2

node/assert.d.ts
/**
* The `node:assert` module provides a set of assertion functions for verifying
* invariants.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/assert.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/assert.js)
*/

@@ -6,0 +6,0 @@ declare module "assert" {

@@ -15,3 +15,3 @@ /**

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/async_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/async_hooks.js)
*/

@@ -18,0 +18,0 @@ declare module "async_hooks" {

@@ -53,3 +53,3 @@ /**

* On Windows, it is not yet possible to set up a named pipe server in a worker.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/cluster.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/cluster.js)
*/

@@ -56,0 +56,0 @@ declare module "cluster" {

@@ -57,3 +57,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js)
*/

@@ -60,0 +60,0 @@ declare module "console" {

@@ -26,3 +26,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/dgram.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dgram.js)
*/

@@ -29,0 +29,0 @@ declare module "dgram" {

@@ -23,3 +23,3 @@ /**

* @since v15.1.0, v14.17.0
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/diagnostics_channel.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/diagnostics_channel.js)
*/

@@ -423,2 +423,5 @@ declare module "diagnostics_channel" {

*
* To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
* which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
*
* ```js

@@ -456,2 +459,5 @@ * import diagnostics_channel from 'node:diagnostics_channel';

*
* To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
* which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
*
* ```js

@@ -508,2 +514,5 @@ * import diagnostics_channel from 'node:diagnostics_channel';

*
* To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
* which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
*
* ```js

@@ -510,0 +519,0 @@ * import diagnostics_channel from 'node:diagnostics_channel';

@@ -45,3 +45,3 @@ /**

* See the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/dns.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dns.js)
*/

@@ -68,3 +68,3 @@ declare module "dns" {

/**
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used

@@ -86,4 +86,13 @@ * with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.

/**
* 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-v20.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. Default value is configurable using {@link setDefaultResultOrder()}
* 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}
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).

@@ -669,10 +678,11 @@ * @default true (addresses are not reordered)

/**
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: for `verbatim` defaulting to `false`.
* * `verbatim`: for `verbatim` defaulting to `true`.
* * `ipv4first`: for `order` defaulting to `ipv4first`.
* * `ipv6first`: for `order` defaulting to `ipv6first`.
* * `verbatim`: for `order` defaulting to `verbatim`.
* @since v18.17.0
*/
export function getDefaultResultOrder(): "ipv4first" | "verbatim";
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
/**

@@ -724,7 +734,8 @@ * Sets the IP address and port of servers to be used when performing DNS

/**
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: sets default `verbatim` `false`.
* * `verbatim`: sets default `verbatim` `true`.
* * `ipv4first`: sets default `order` to `ipv4first`.
* * `ipv6first`: sets default `order` to `ipv6first`.
* * `verbatim`: sets default `order` to `verbatim`.
*

@@ -736,5 +747,5 @@ * The default is `verbatim` and {@link setDefaultResultOrder} have higher

* @since v16.4.0, v14.18.0
* @param order must be `'ipv4first'` or `'verbatim'`.
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
*/
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
// Error codes

@@ -741,0 +752,0 @@ export const NODATA: "NODATA";

@@ -341,3 +341,3 @@ /**

* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
* That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* subsequent servers provided. Fallback DNS servers will only be used if the

@@ -350,6 +350,7 @@ * earlier ones time out or result in some other error.

/**
* Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
* Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be:
*
* * `ipv4first`: sets default `verbatim` `false`.
* * `verbatim`: sets default `verbatim` `true`.
* * `ipv4first`: sets default `order` to `ipv4first`.
* * `ipv6first`: sets default `order` to `ipv6first`.
* * `verbatim`: sets default `order` to `verbatim`.
*

@@ -361,5 +362,5 @@ * The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)

* @since v16.4.0, v14.18.0
* @param order must be `'ipv4first'` or `'verbatim'`.
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
*/
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
const NODATA: "NODATA";

@@ -366,0 +367,0 @@ const FORMERR: "FORMERR";

@@ -15,3 +15,3 @@ /**

* @deprecated Since v1.4.2 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/domain.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/domain.js)
*/

@@ -18,0 +18,0 @@ declare module "domain" {

@@ -35,3 +35,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/events.js)
*/

@@ -80,3 +80,23 @@ declare module "events" {

interface StaticEventEmitterOptions {
/**
* Can be used to cancel awaiting events.
*/
signal?: AbortSignal | undefined;
/**
* Names of events that will end the iteration.
*/
close?: string[] | undefined;
/**
* The high watermark. The emitter is paused every time the size
* of events being buffered is higher than it. Supported only
* on emitters implementing `pause()` and `resume()` methods.
* @default `Number.MAX_SAFE_INTEGER`
*/
highWaterMark?: number | undefined;
/**
* The low watermark. The emitter is resumed every time the size of events being buffered
* is lower than it. Supported only on emitters implementing `pause()` and `resume()` methods.
* @default 1
*/
lowWaterMark?: number | undefined;
}

@@ -201,3 +221,3 @@ interface EventEmitter<T extends EventMap<T> = DefaultEventMap> extends NodeJS.EventEmitter<T> {}

eventName: string | symbol,
options?: StaticEventEmitterOptions,
options?: Pick<StaticEventEmitterOptions, "signal">,
): Promise<any[]>;

@@ -204,0 +224,0 @@ static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;

/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/https.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/https.js)
*/

@@ -6,0 +6,0 @@ declare module "https" {

@@ -13,3 +13,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/net.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/net.js)
*/

@@ -903,4 +903,5 @@ declare module "net" {

* Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
* The initial default value is `250`.
* @since v19.8.0
* The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
* @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
* @since v19.8.0, v18.8.0
*/

@@ -910,3 +911,5 @@ function getDefaultAutoSelectFamilyAttemptTimeout(): number;

* Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
* @since v19.8.0
* @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line
* option `--network-family-autoselection-attempt-timeout`.
* @since v19.8.0, v18.8.0
*/

@@ -913,0 +916,0 @@ function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void;

@@ -8,3 +8,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/os.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/os.js)
*/

@@ -11,0 +11,0 @@ declare module "os" {

{
"name": "@types/node",
"version": "20.12.12",
"version": "20.12.13",
"description": "TypeScript definitions for node",

@@ -215,4 +215,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

},
"typesPublisherContentHash": "402e23fae4726c16c2a42ec4d2c7348a15cefadefe71ba6808b89ecca3e73a79",
"typesPublisherContentHash": "2d891864cff33b08851d25357e4621359743e809c9666828090db9fe798326cc",
"typeScriptVersion": "4.7"
}

@@ -16,3 +16,3 @@ declare module "path/posix" {

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/path.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/path.js)
*/

@@ -19,0 +19,0 @@ declare module "path" {

@@ -30,3 +30,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/perf_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/perf_hooks.js)
*/

@@ -155,2 +155,7 @@ declare module "perf_hooks" {

/**
* The high resolution millisecond timestamp at which the Node.js process was initialized.
* @since v8.5.0
*/
readonly nodeStart: number;
/**
* The high resolution millisecond timestamp at which the V8 platform was

@@ -168,8 +173,8 @@ * initialized.

/**
* @param util1 The result of a previous call to eventLoopUtilization()
* @param util2 The result of a previous call to eventLoopUtilization() prior to util1
* @param utilization1 The result of a previous call to `eventLoopUtilization()`.
* @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`.
*/
type EventLoopUtilityFunction = (
util1?: EventLoopUtilization,
util2?: EventLoopUtilization,
utilization1?: EventLoopUtilization,
utilization2?: EventLoopUtilization,
) => EventLoopUtilization;

@@ -183,3 +188,3 @@ interface MarkOptions {

* An optional timestamp to be used as the mark time.
* @default `performance.now()`.
* @default `performance.now()`
*/

@@ -208,5 +213,4 @@ startTime?: number | undefined;

/**
* A histogram object created using
* `perf_hooks.createHistogram()` that will record runtime durations in
* nanoseconds.
* A histogram object created using `perf_hooks.createHistogram()` that will record runtime
* durations in nanoseconds.
*/

@@ -217,11 +221,10 @@ histogram?: RecordableHistogram | undefined;

/**
* If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
* If name is provided, removes only the named mark.
* @param name
* If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline.
* If `name` is provided, removes only the named mark.
* @since v8.5.0
*/
clearMarks(name?: string): void;
/**
* If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
* If name is provided, removes only the named measure.
* @param name
* If `name` is not provided, removes all `PerformanceMeasure` objects from the Performance Timeline.
* If `name` is provided, removes only the named measure.
* @since v16.7.0

@@ -231,2 +234,14 @@ */

/**
* If `name` is not provided, removes all `PerformanceResourceTiming` objects from the Resource Timeline.
* If `name` is provided, removes only the named resource.
* @since v18.2.0, v16.17.0
*/
clearResourceTimings(name?: string): void;
/**
* eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
* It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
* No other CPU idle time is taken into consideration.
*/
eventLoopUtilization: EventLoopUtilityFunction;
/**
* Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.

@@ -254,10 +269,13 @@ * If you are only interested in performance entries of certain types or that have certain names, see

/**
* Creates a new PerformanceMark entry in the Performance Timeline.
* A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
* and whose performanceEntry.duration is always 0.
* Creates a new `PerformanceMark` entry in the Performance Timeline.
* A `PerformanceMark` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'mark'`,
* and whose `performanceEntry.duration` is always `0`.
* Performance marks are used to mark specific significant moments in the Performance Timeline.
*
* The created `PerformanceMark` entry is put in the global Performance Timeline and can be queried with
* `performance.getEntries`, `performance.getEntriesByName`, and `performance.getEntriesByType`. When the observation is
* performed, the entries should be cleared from the global Performance Timeline manually with `performance.clearMarks`.
* @param name
* @return The PerformanceMark entry that was created
*/
mark(name?: string, options?: MarkOptions): PerformanceMark;
mark(name: string, options?: MarkOptions): PerformanceMark;
/**

@@ -282,16 +300,59 @@ * Creates a new PerformanceMeasure entry in the Performance Timeline.

/**
* An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
* _This property is an extension by Node.js. It is not available in Web browsers._
*
* An instance of the `PerformanceNodeTiming` class that provides performance metrics for specific Node.js operational milestones.
* @since v8.5.0
*/
readonly nodeTiming: PerformanceNodeTiming;
/**
* @return the current high resolution millisecond timestamp
* Returns the current high resolution millisecond timestamp, where 0 represents the start of the current `node` process.
* @since v8.5.0
*/
now(): number;
/**
* The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
* Sets the global performance resource timing buffer size to the specified number of "resource" type performance entry objects.
*
* By default the max buffer size is set to 250.
* @since v18.8.0
*/
setResourceTimingBufferSize(maxSize: number): void;
/**
* The [`timeOrigin`](https://w3c.github.io/hr-time/#dom-performance-timeorigin) specifies the high resolution millisecond timestamp
* at which the current `node` process began, measured in Unix time.
* @since v8.5.0
*/
readonly timeOrigin: number;
/**
* _This property is an extension by Node.js. It is not available in Web browsers._
*
* Wraps a function within a new function that measures the running time of the wrapped function.
* A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
* A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed.
*
* ```js
* const {
* performance,
* PerformanceObserver,
* } = require('node:perf_hooks');
*
* function someFunction() {
* console.log('hello world');
* }
*
* const wrapped = performance.timerify(someFunction);
*
* const obs = new PerformanceObserver((list) => {
* console.log(list.getEntries()[0].duration);
*
* performance.clearMarks();
* performance.clearMeasures();
* obs.disconnect();
* });
* obs.observe({ entryTypes: ['function'] });
*
* // A performance timeline entry will be created
* wrapped();
* ```
*
* If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported
* once the finally handler is invoked.
* @param fn

@@ -301,9 +362,9 @@ */

/**
* eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
* It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
* No other CPU idle time is taken into consideration.
* An object which is JSON representation of the performance object. It is similar to
* [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers.
* @since v16.1.0
*/
eventLoopUtilization: EventLoopUtilityFunction;
toJSON(): any;
}
interface PerformanceObserverEntryList {
class PerformanceObserverEntryList {
/**

@@ -488,2 +549,99 @@ * Returns a list of `PerformanceEntry` objects in chronological order

}
/**
* Provides detailed network timing data regarding the loading of an application's resources.
*
* The constructor of this class is not exposed to users directly.
* @since v18.2.0, v16.17.0
*/
class PerformanceResourceTiming extends PerformanceEntry {
protected constructor();
/**
* The high resolution millisecond timestamp at immediately before dispatching the `fetch`
* request. If the resource is not intercepted by a worker the property will always return 0.
* @since v18.2.0, v16.17.0
*/
readonly workerStart: number;
/**
* The high resolution millisecond timestamp that represents the start time of the fetch which
* initiates the redirect.
* @since v18.2.0, v16.17.0
*/
readonly redirectStart: number;
/**
* The high resolution millisecond timestamp that will be created immediately after receiving
* the last byte of the response of the last redirect.
* @since v18.2.0, v16.17.0
*/
readonly redirectEnd: number;
/**
* The high resolution millisecond timestamp immediately before the Node.js starts to fetch the resource.
* @since v18.2.0, v16.17.0
*/
readonly fetchStart: number;
/**
* The high resolution millisecond timestamp immediately before the Node.js starts the domain name lookup
* for the resource.
* @since v18.2.0, v16.17.0
*/
readonly domainLookupStart: number;
/**
* The high resolution millisecond timestamp representing the time immediately after the Node.js finished
* the domain name lookup for the resource.
* @since v18.2.0, v16.17.0
*/
readonly domainLookupEnd: number;
/**
* The high resolution millisecond timestamp representing the time immediately before Node.js starts to
* establish the connection to the server to retrieve the resource.
* @since v18.2.0, v16.17.0
*/
readonly connectStart: number;
/**
* The high resolution millisecond timestamp representing the time immediately after Node.js finishes
* establishing the connection to the server to retrieve the resource.
* @since v18.2.0, v16.17.0
*/
readonly connectEnd: number;
/**
* The high resolution millisecond timestamp representing the time immediately before Node.js starts the
* handshake process to secure the current connection.
* @since v18.2.0, v16.17.0
*/
readonly secureConnectionStart: number;
/**
* The high resolution millisecond timestamp representing the time immediately before Node.js receives the
* first byte of the response from the server.
* @since v18.2.0, v16.17.0
*/
readonly requestStart: number;
/**
* The high resolution millisecond timestamp representing the time immediately after Node.js receives the
* last byte of the resource or immediately before the transport connection is closed, whichever comes first.
* @since v18.2.0, v16.17.0
*/
readonly responseEnd: number;
/**
* A number representing the size (in octets) of the fetched resource. The size includes the response header
* fields plus the response payload body.
* @since v18.2.0, v16.17.0
*/
readonly transferSize: number;
/**
* A number representing the size (in octets) received from the fetch (HTTP or cache), of the payload body, before
* removing any applied content-codings.
* @since v18.2.0, v16.17.0
*/
readonly encodedBodySize: number;
/**
* A number representing the size (in octets) received from the fetch (HTTP or cache), of the message body, after
* removing any applied content-codings.
* @since v18.2.0, v16.17.0
*/
readonly decodedBodySize: number;
/**
* Returns a `object` that is the JSON representation of the `PerformanceResourceTiming` object
* @since v18.2.0, v16.17.0
*/
toJSON(): any;
}
namespace constants {

@@ -513,7 +671,12 @@ const NODE_PERFORMANCE_GC_MAJOR: number;

/**
* Returns a `Map` object detailing the accumulated percentile distribution.
* @since v11.10.0
* The number of samples recorded by the histogram.
* @since v17.4.0, v16.14.0
*/
readonly percentiles: Map<number, number>;
readonly count: number;
/**
* The number of samples recorded by the histogram.
* v17.4.0, v16.14.0
*/
readonly countBigInt: bigint;
/**
* The number of times the event loop delay exceeded the maximum 1 hour event

@@ -525,6 +688,6 @@ * loop delay threshold.

/**
* The minimum recorded event loop delay.
* @since v11.10.0
* The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
* @since v17.4.0, v16.14.0
*/
readonly min: number;
readonly exceedsBigInt: bigint;
/**

@@ -536,2 +699,7 @@ * The maximum recorded event loop delay.

/**
* The maximum recorded event loop delay.
* v17.4.0, v16.14.0
*/
readonly maxBigInt: number;
/**
* The mean of the recorded event loop delays.

@@ -542,7 +710,34 @@ * @since v11.10.0

/**
* The standard deviation of the recorded event loop delays.
* The minimum recorded event loop delay.
* @since v11.10.0
*/
readonly stddev: number;
readonly min: number;
/**
* The minimum recorded event loop delay.
* v17.4.0, v16.14.0
*/
readonly minBigInt: bigint;
/**
* Returns the value at the given percentile.
* @since v11.10.0
* @param percentile A percentile value in the range (0, 100].
*/
percentile(percentile: number): number;
/**
* Returns the value at the given percentile.
* @since v17.4.0, v16.14.0
* @param percentile A percentile value in the range (0, 100].
*/
percentileBigInt(percentile: number): bigint;
/**
* Returns a `Map` object detailing the accumulated percentile distribution.
* @since v11.10.0
*/
readonly percentiles: Map<number, number>;
/**
* Returns a `Map` object detailing the accumulated percentile distribution.
* @since v17.4.0, v16.14.0
*/
readonly percentilesBigInt: Map<bigint, bigint>;
/**
* Resets the collected histogram data.

@@ -553,7 +748,6 @@ * @since v11.10.0

/**
* Returns the value at the given percentile.
* The standard deviation of the recorded event loop delays.
* @since v11.10.0
* @param percentile A percentile value in the range (0, 100].
*/
percentile(percentile: number): number;
readonly stddev: number;
}

@@ -583,4 +777,2 @@ interface IntervalHistogram extends Histogram {

* previous call to `recordDelta()` and records that amount in the histogram.
*
* ## Examples
* @since v15.9.0, v14.18.0

@@ -646,7 +838,75 @@ */

function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
import { performance as _performance } from "perf_hooks";
import {
performance as _performance,
PerformanceEntry as _PerformanceEntry,
PerformanceMark as _PerformanceMark,
PerformanceMeasure as _PerformanceMeasure,
PerformanceObserver as _PerformanceObserver,
PerformanceObserverEntryList as _PerformanceObserverEntryList,
PerformanceResourceTiming as _PerformanceResourceTiming,
} from "perf_hooks";
global {
/**
* `performance` is a global reference for `require('perf_hooks').performance`
* https://nodejs.org/api/globals.html#performance
* `PerformanceEntry` is a global reference for `require('node:perf_hooks').PerformanceEntry`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceentry
* @since v19.0.0
*/
var PerformanceEntry: typeof globalThis extends {
onmessage: any;
PerformanceEntry: infer T;
} ? T
: typeof _PerformanceEntry;
/**
* `PerformanceMark` is a global reference for `require('node:perf_hooks').PerformanceMark`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemark
* @since v19.0.0
*/
var PerformanceMark: typeof globalThis extends {
onmessage: any;
PerformanceMark: infer T;
} ? T
: typeof _PerformanceMark;
/**
* `PerformanceMeasure` is a global reference for `require('node:perf_hooks').PerformanceMeasure`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemeasure
* @since v19.0.0
*/
var PerformanceMeasure: typeof globalThis extends {
onmessage: any;
PerformanceMeasure: infer T;
} ? T
: typeof _PerformanceMeasure;
/**
* `PerformanceObserver` is a global reference for `require('node:perf_hooks').PerformanceObserver`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserver
* @since v19.0.0
*/
var PerformanceObserver: typeof globalThis extends {
onmessage: any;
PerformanceObserver: infer T;
} ? T
: typeof _PerformanceObserver;
/**
* `PerformanceObserverEntryList` is a global reference for `require('node:perf_hooks').PerformanceObserverEntryList`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserverentrylist
* @since v19.0.0
*/
var PerformanceObserverEntryList: typeof globalThis extends {
onmessage: any;
PerformanceObserverEntryList: infer T;
} ? T
: typeof _PerformanceObserverEntryList;
/**
* `PerformanceResourceTiming` is a global reference for `require('node:perf_hooks').PerformanceResourceTiming`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceresourcetiming
* @since v19.0.0
*/
var PerformanceResourceTiming: typeof globalThis extends {
onmessage: any;
PerformanceResourceTiming: infer T;
} ? T
: typeof _PerformanceResourceTiming;
/**
* `performance` is a global reference for `require('node:perf_hooks').performance`
* @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performance
* @since v16.0.0

@@ -653,0 +913,0 @@ */

@@ -27,3 +27,3 @@ /**

* @deprecated Since v7.0.0 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/punycode.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/punycode.js)
*/

@@ -30,0 +30,0 @@ declare module "punycode" {

@@ -12,3 +12,3 @@ /**

* when compatibility with browser code is desirable.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/querystring.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/querystring.js)
*/

@@ -15,0 +15,0 @@ declare module "querystring" {

@@ -34,3 +34,3 @@ /**

* received on the `input` stream.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/readline.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/readline.js)
*/

@@ -37,0 +37,0 @@ declare module "readline" {

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 14 May 2024 06:09:35 GMT
* Last updated: Wed, 29 May 2024 17:07:22 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

@@ -14,0 +14,0 @@

@@ -9,3 +9,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/repl.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/repl.js)
*/

@@ -12,0 +12,0 @@ declare module "repl" {

@@ -39,3 +39,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/string_decoder.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/string_decoder.js)
*/

@@ -42,0 +42,0 @@ declare module "string_decoder" {

@@ -9,3 +9,3 @@ /**

* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/timers.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/timers.js)
*/

@@ -12,0 +12,0 @@ declare module "timers" {

@@ -9,3 +9,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/tls.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/tls.js)
*/

@@ -12,0 +12,0 @@ declare module "tls" {

@@ -93,3 +93,3 @@ /**

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/trace_events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/trace_events.js)
*/

@@ -96,0 +96,0 @@ declare module "trace_events" {

@@ -24,3 +24,3 @@ /**

* manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/tty.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/tty.js)
*/

@@ -27,0 +27,0 @@ declare module "tty" {

@@ -8,3 +8,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/url.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/url.js)
*/

@@ -50,2 +50,10 @@ declare module "url" {

}
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 {}
/**

@@ -303,3 +311,3 @@ * The `url.parse()` method takes a URL string, parses it, and returns a URL

*/
function fileURLToPath(url: string | URL): string;
function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string;
/**

@@ -322,3 +330,3 @@ * This function ensures that `path` is resolved absolutely, and that the URL

*/
function pathToFileURL(path: string): URL;
function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL;
/**

@@ -325,0 +333,0 @@ * This utility function converts a URL object into an ordinary options object as

@@ -7,3 +7,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/v8.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js)
*/

@@ -188,2 +188,46 @@ declare module "v8" {

/**
* This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function)
* provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain
* in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should
* avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the
* application.
*
* To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects
* found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided
* in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the
* target objects during the search.
*
* Only objects created in the current execution context are included in the results.
*
* ```js
* import { queryObjects } from 'node:v8';
* class A { foo = 'bar'; }
* console.log(queryObjects(A)); // 0
* const a = new A();
* console.log(queryObjects(A)); // 1
* // [ "A { foo: 'bar' }" ]
* console.log(queryObjects(A, { format: 'summary' }));
*
* class B extends A { bar = 'qux'; }
* const b = new B();
* console.log(queryObjects(B)); // 1
* // [ "B { foo: 'bar', bar: 'qux' }" ]
* console.log(queryObjects(B, { format: 'summary' }));
*
* // Note that, when there are child classes inheriting from a constructor,
* // the constructor also shows up in the prototype chain of the child
* // classes's prototoype, so the child classes's prototoype would also be
* // included in the result.
* console.log(queryObjects(A)); // 3
* // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ]
* console.log(queryObjects(A, { format: 'summary' }));
* ```
* @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap.
* @since v20.13.0
* @experimental
*/
function queryObjects(ctor: Function): number | string[];
function queryObjects(ctor: Function, options: { format: "count" }): number;
function queryObjects(ctor: Function, options: { format: "summary" }): string[];
/**
* Generates a snapshot of the current V8 heap and returns a Readable

@@ -190,0 +234,0 @@ * Stream that may be used to read the JSON serialized representation.

@@ -37,3 +37,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/vm.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/vm.js)
*/

@@ -351,7 +351,10 @@ declare module "vm" {

/**
* If given a `contextObject`, the `vm.createContext()` method will `prepare
* that object` so that it can be used in calls to {@link runInContext} or `script.runInContext()`. Inside such scripts,
* the `contextObject` will be the global object, retaining all of its existing
* properties but also having the built-in objects and functions any standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global variables
* will remain unchanged.
* If given a `contextObject`, the `vm.createContext()` method will
* [prepare that object](https://nodejs.org/docs/latest-v20.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
* and return a reference to it so that it can be used in `{@link runInContext}` or
* [`script.runInContext()`](https://nodejs.org/docs/latest-v20.x/api/vm.html#scriptrunincontextcontextifiedobject-options). Inside such
* scripts, the `contextObject` will be the global object, retaining all of its
* existing properties but also having the built-in objects and functions any
* standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
* variables will remain unchanged.
*

@@ -358,0 +361,0 @@ * ```js

@@ -70,3 +70,3 @@ /**

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/wasi.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/wasi.js)
*/

@@ -73,0 +73,0 @@ declare module "wasi" {

@@ -52,3 +52,3 @@ /**

* specifically `argv` and `execArgv` options.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/worker_threads.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/worker_threads.js)
*/

@@ -55,0 +55,0 @@ declare module "worker_threads" {

@@ -92,3 +92,3 @@ /**

* @since v0.5.8
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/zlib.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/zlib.js)
*/

@@ -95,0 +95,0 @@ declare module "zlib" {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc