Socket
Socket
Sign inDemoInstall

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1895
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.8.0 to 20.8.10

48

node/events.d.ts

@@ -38,2 +38,3 @@ /**

declare module "events" {
import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
// NOTE: This class is in the docs but is **not actually exported** by Node.

@@ -111,2 +112,5 @@ // If https://github.com/nodejs/node/issues/39903 gets resolved and Node

constructor(options?: EventEmitterOptions);
[EventEmitter.captureRejectionSymbol]?(error: Error, event: string, ...args: any[]): void;
/**

@@ -456,2 +460,45 @@ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given

}
export interface EventEmitterReferencingAsyncResource extends AsyncResource {
readonly eventEmitter: EventEmitterAsyncResource;
}
export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions {
/**
* The type of async event, this is required when instantiating `EventEmitterAsyncResource`
* directly rather than as a child class.
* @default new.target.name if instantiated as a child class.
*/
name?: string;
}
/**
* Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that require
* manual async tracking. Specifically, all events emitted by instances of
* `EventEmitterAsyncResource` will run within its async context.
*
* The EventEmitterAsyncResource class has the same methods and takes the
* same options as EventEmitter and AsyncResource themselves.
* @throws if `options.name` is not provided when instantiated directly.
* @since v17.4.0, v16.14.0
*/
export class EventEmitterAsyncResource extends EventEmitter {
/**
* @param options Only optional in child class.
*/
constructor(options?: EventEmitterAsyncResourceOptions);
/**
* Call all destroy hooks. This should only ever be called once. An
* error will be thrown if it is called more than once. This must be
* manually called. If the resource is left to be collected by the GC then
* the destroy hooks will never be called.
*/
emitDestroy(): void;
/** The unique asyncId assigned to the resource. */
readonly asyncId: number;
/** The same triggerAsyncId that is passed to the AsyncResource constructor. */
readonly triggerAsyncId: number;
/** The underlying AsyncResource */
readonly asyncResource: EventEmitterReferencingAsyncResource;
}
}

@@ -461,2 +508,3 @@ global {

interface EventEmitter {
[EventEmitter.captureRejectionSymbol]?(error: Error, event: string, ...args: any[]): void;
/**

@@ -463,0 +511,0 @@ * Alias for `emitter.on(eventName, listener)`.

@@ -323,2 +323,60 @@ // Declare "static" methods in Error

}
namespace fetch {
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").RequestInit;
type Request = globalThis.Request;
type Response = globalThis.Response;
type Headers = globalThis.Headers;
type FormData = globalThis.FormData;
type RequestInit = globalThis.RequestInit;
type RequestInfo = import("undici-types").RequestInfo;
type HeadersInit = import("undici-types").HeadersInit;
type BodyInit = import("undici-types").BodyInit;
type RequestRedirect = import("undici-types").RequestRedirect;
type RequestCredentials = import("undici-types").RequestCredentials;
type RequestMode = import("undici-types").RequestMode;
type ReferrerPolicy = import("undici-types").ReferrerPolicy;
type Dispatcher = import("undici-types").Dispatcher;
type RequestDuplex = import("undici-types").RequestDuplex;
}
}
interface RequestInit extends NodeJS.fetch._RequestInit {}
declare function fetch(
input: NodeJS.fetch.RequestInfo,
init?: RequestInit,
): Promise<Response>;
interface Request extends NodeJS.fetch._Request {}
declare var Request: typeof globalThis extends {
onmessage: any;
Request: infer T;
} ? T
: typeof import("undici-types").Request;
interface Response extends NodeJS.fetch._Response {}
declare var Response: typeof globalThis extends {
onmessage: any;
Response: infer T;
} ? T
: typeof import("undici-types").Response;
interface FormData extends NodeJS.fetch._FormData {}
declare var FormData: typeof globalThis extends {
onmessage: any;
FormData: infer T;
} ? T
: typeof import("undici-types").FormData;
interface Headers extends NodeJS.fetch._Headers {}
declare var Headers: typeof globalThis extends {
onmessage: any;
Headers: infer T;
} ? T
: typeof import("undici-types").Headers;

45

node/index.d.ts

@@ -1,46 +0,1 @@

// Type definitions for non-npm package Node.js 20.8
// Project: https://nodejs.org/
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
// DefinitelyTyped <https://github.com/DefinitelyTyped>
// Alberto Schiabel <https://github.com/jkomyno>
// Alvis HT Tang <https://github.com/alvis>
// Andrew Makarov <https://github.com/r3nya>
// Benjamin Toueg <https://github.com/btoueg>
// Chigozirim C. <https://github.com/smac89>
// David Junger <https://github.com/touffy>
// Deividas Bakanas <https://github.com/DeividasBakanas>
// Eugene Y. Q. Shen <https://github.com/eyqs>
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
// Huw <https://github.com/hoo29>
// Kelvin Jin <https://github.com/kjin>
// Klaus Meinhardt <https://github.com/ajafff>
// Lishude <https://github.com/islishude>
// Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
// Mohsen Azimi <https://github.com/mohsen1>
// Nicolas Even <https://github.com/n-e>
// Nikita Galkin <https://github.com/galkin>
// Parambir Singh <https://github.com/parambirs>
// Sebastian Silbermann <https://github.com/eps1lon>
// Thomas den Hollander <https://github.com/ThomasdenH>
// Wilco Bakker <https://github.com/WilcoBakker>
// wwwy3y3 <https://github.com/wwwy3y3>
// Samuel Ainsworth <https://github.com/samuela>
// Kyle Uehlein <https://github.com/kuehlein>
// Thanik Bhongbhibhat <https://github.com/bhongy>
// Marcin Kopacz <https://github.com/chyzwar>
// Trivikram Kamat <https://github.com/trivikr>
// Junxiao Shi <https://github.com/yoursunny>
// Ilia Baryshnikov <https://github.com/qwelias>
// ExE Boss <https://github.com/ExE-Boss>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Anna Henningsen <https://github.com/addaleax>
// Victor Perin <https://github.com/victorperin>
// Yongsheng Zhang <https://github.com/ZYSzys>
// NodeJS Contributors <https://github.com/NodeJS>
// Linus Unnebäck <https://github.com/LinusU>
// wafuwafu13 <https://github.com/wafuwafu13>
// Matteo Collina <https://github.com/mcollina>
// Dmitry Semigradsky <https://github.com/Semigradsky>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**

@@ -47,0 +2,0 @@ * License for programmatically and manually incorporated

14

node/module.d.ts

@@ -270,8 +270,10 @@ /**

*
* @param specified The module specifier to resolve relative to the current module.
* @since v20.6.0
*
* @param specifier The module specifier to resolve relative to the current module.
* @returns The absolute (`file:`) URL string for the resolved module.
*/
resolve(specified: string): string;
resolve(specifier: string): string;
/**
* This feature is only available with the `--experimental-import-meta-resolve`
* This `parent` parameter is only used when the `--experimental-import-meta-resolve`
* command flag enabled.

@@ -282,7 +284,9 @@ *

*
* @param specified The module specifier to resolve relative to `parent`.
* @since v20.6.0
*
* @param specifier The module specifier to resolve relative to `parent`.
* @param parent The absolute parent module URL to resolve from.
* @returns The absolute (`file:`) URL string for the resolved module.
*/
resolve(specified: string, parent: string | URL): string;
resolve(specifier: string, parent: string | URL): string;
}

@@ -289,0 +293,0 @@ }

@@ -95,2 +95,8 @@ /**

/**
* Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately.
* If the socket is still writable it implicitly calls `socket.end()`.
* @since v0.3.4
*/
destroySoon(): void;
/**
* Sends data on the socket. The second parameter specifies the encoding in the

@@ -97,0 +103,0 @@ * case of a string. It defaults to UTF8 encoding.

@@ -41,3 +41,3 @@ /**

gid: number;
shell: T;
shell: T | null;
homedir: T;

@@ -44,0 +44,0 @@ }

{
"name": "@types/node",
"version": "20.8.0",
"description": "TypeScript definitions for Node.js",
"version": "20.8.10",
"description": "TypeScript definitions for node",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

@@ -10,204 +10,199 @@ "license": "MIT",

"name": "Microsoft TypeScript",
"url": "https://github.com/Microsoft",
"githubUsername": "Microsoft"
"githubUsername": "Microsoft",
"url": "https://github.com/Microsoft"
},
{
"name": "DefinitelyTyped",
"url": "https://github.com/DefinitelyTyped",
"githubUsername": "DefinitelyTyped"
},
{
"name": "Alberto Schiabel",
"url": "https://github.com/jkomyno",
"githubUsername": "jkomyno"
"githubUsername": "jkomyno",
"url": "https://github.com/jkomyno"
},
{
"name": "Alvis HT Tang",
"url": "https://github.com/alvis",
"githubUsername": "alvis"
"githubUsername": "alvis",
"url": "https://github.com/alvis"
},
{
"name": "Andrew Makarov",
"url": "https://github.com/r3nya",
"githubUsername": "r3nya"
"githubUsername": "r3nya",
"url": "https://github.com/r3nya"
},
{
"name": "Benjamin Toueg",
"url": "https://github.com/btoueg",
"githubUsername": "btoueg"
"githubUsername": "btoueg",
"url": "https://github.com/btoueg"
},
{
"name": "Chigozirim C.",
"url": "https://github.com/smac89",
"githubUsername": "smac89"
"githubUsername": "smac89",
"url": "https://github.com/smac89"
},
{
"name": "David Junger",
"url": "https://github.com/touffy",
"githubUsername": "touffy"
"githubUsername": "touffy",
"url": "https://github.com/touffy"
},
{
"name": "Deividas Bakanas",
"url": "https://github.com/DeividasBakanas",
"githubUsername": "DeividasBakanas"
"githubUsername": "DeividasBakanas",
"url": "https://github.com/DeividasBakanas"
},
{
"name": "Eugene Y. Q. Shen",
"url": "https://github.com/eyqs",
"githubUsername": "eyqs"
"githubUsername": "eyqs",
"url": "https://github.com/eyqs"
},
{
"name": "Hannes Magnusson",
"url": "https://github.com/Hannes-Magnusson-CK",
"githubUsername": "Hannes-Magnusson-CK"
"githubUsername": "Hannes-Magnusson-CK",
"url": "https://github.com/Hannes-Magnusson-CK"
},
{
"name": "Huw",
"url": "https://github.com/hoo29",
"githubUsername": "hoo29"
"githubUsername": "hoo29",
"url": "https://github.com/hoo29"
},
{
"name": "Kelvin Jin",
"url": "https://github.com/kjin",
"githubUsername": "kjin"
"githubUsername": "kjin",
"url": "https://github.com/kjin"
},
{
"name": "Klaus Meinhardt",
"url": "https://github.com/ajafff",
"githubUsername": "ajafff"
"githubUsername": "ajafff",
"url": "https://github.com/ajafff"
},
{
"name": "Lishude",
"url": "https://github.com/islishude",
"githubUsername": "islishude"
"githubUsername": "islishude",
"url": "https://github.com/islishude"
},
{
"name": "Mariusz Wiktorczyk",
"url": "https://github.com/mwiktorczyk",
"githubUsername": "mwiktorczyk"
"githubUsername": "mwiktorczyk",
"url": "https://github.com/mwiktorczyk"
},
{
"name": "Mohsen Azimi",
"url": "https://github.com/mohsen1",
"githubUsername": "mohsen1"
"githubUsername": "mohsen1",
"url": "https://github.com/mohsen1"
},
{
"name": "Nicolas Even",
"url": "https://github.com/n-e",
"githubUsername": "n-e"
"githubUsername": "n-e",
"url": "https://github.com/n-e"
},
{
"name": "Nikita Galkin",
"url": "https://github.com/galkin",
"githubUsername": "galkin"
"githubUsername": "galkin",
"url": "https://github.com/galkin"
},
{
"name": "Parambir Singh",
"url": "https://github.com/parambirs",
"githubUsername": "parambirs"
"githubUsername": "parambirs",
"url": "https://github.com/parambirs"
},
{
"name": "Sebastian Silbermann",
"url": "https://github.com/eps1lon",
"githubUsername": "eps1lon"
"githubUsername": "eps1lon",
"url": "https://github.com/eps1lon"
},
{
"name": "Thomas den Hollander",
"url": "https://github.com/ThomasdenH",
"githubUsername": "ThomasdenH"
"githubUsername": "ThomasdenH",
"url": "https://github.com/ThomasdenH"
},
{
"name": "Wilco Bakker",
"url": "https://github.com/WilcoBakker",
"githubUsername": "WilcoBakker"
"githubUsername": "WilcoBakker",
"url": "https://github.com/WilcoBakker"
},
{
"name": "wwwy3y3",
"url": "https://github.com/wwwy3y3",
"githubUsername": "wwwy3y3"
"githubUsername": "wwwy3y3",
"url": "https://github.com/wwwy3y3"
},
{
"name": "Samuel Ainsworth",
"url": "https://github.com/samuela",
"githubUsername": "samuela"
"githubUsername": "samuela",
"url": "https://github.com/samuela"
},
{
"name": "Kyle Uehlein",
"url": "https://github.com/kuehlein",
"githubUsername": "kuehlein"
"githubUsername": "kuehlein",
"url": "https://github.com/kuehlein"
},
{
"name": "Thanik Bhongbhibhat",
"url": "https://github.com/bhongy",
"githubUsername": "bhongy"
"githubUsername": "bhongy",
"url": "https://github.com/bhongy"
},
{
"name": "Marcin Kopacz",
"url": "https://github.com/chyzwar",
"githubUsername": "chyzwar"
"githubUsername": "chyzwar",
"url": "https://github.com/chyzwar"
},
{
"name": "Trivikram Kamat",
"url": "https://github.com/trivikr",
"githubUsername": "trivikr"
"githubUsername": "trivikr",
"url": "https://github.com/trivikr"
},
{
"name": "Junxiao Shi",
"url": "https://github.com/yoursunny",
"githubUsername": "yoursunny"
"githubUsername": "yoursunny",
"url": "https://github.com/yoursunny"
},
{
"name": "Ilia Baryshnikov",
"url": "https://github.com/qwelias",
"githubUsername": "qwelias"
"githubUsername": "qwelias",
"url": "https://github.com/qwelias"
},
{
"name": "ExE Boss",
"url": "https://github.com/ExE-Boss",
"githubUsername": "ExE-Boss"
"githubUsername": "ExE-Boss",
"url": "https://github.com/ExE-Boss"
},
{
"name": "Piotr Błażejewicz",
"url": "https://github.com/peterblazejewicz",
"githubUsername": "peterblazejewicz"
"githubUsername": "peterblazejewicz",
"url": "https://github.com/peterblazejewicz"
},
{
"name": "Anna Henningsen",
"url": "https://github.com/addaleax",
"githubUsername": "addaleax"
"githubUsername": "addaleax",
"url": "https://github.com/addaleax"
},
{
"name": "Victor Perin",
"url": "https://github.com/victorperin",
"githubUsername": "victorperin"
"githubUsername": "victorperin",
"url": "https://github.com/victorperin"
},
{
"name": "Yongsheng Zhang",
"url": "https://github.com/ZYSzys",
"githubUsername": "ZYSzys"
"githubUsername": "ZYSzys",
"url": "https://github.com/ZYSzys"
},
{
"name": "NodeJS Contributors",
"url": "https://github.com/NodeJS",
"githubUsername": "NodeJS"
"githubUsername": "NodeJS",
"url": "https://github.com/NodeJS"
},
{
"name": "Linus Unnebäck",
"url": "https://github.com/LinusU",
"githubUsername": "LinusU"
"githubUsername": "LinusU",
"url": "https://github.com/LinusU"
},
{
"name": "wafuwafu13",
"url": "https://github.com/wafuwafu13",
"githubUsername": "wafuwafu13"
"githubUsername": "wafuwafu13",
"url": "https://github.com/wafuwafu13"
},
{
"name": "Matteo Collina",
"url": "https://github.com/mcollina",
"githubUsername": "mcollina"
"githubUsername": "mcollina",
"url": "https://github.com/mcollina"
},
{
"name": "Dmitry Semigradsky",
"url": "https://github.com/Semigradsky",
"githubUsername": "Semigradsky"
"githubUsername": "Semigradsky",
"url": "https://github.com/Semigradsky"
}

@@ -230,5 +225,8 @@ ],

"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "7637ed07b3e4b1806d0b4b3e38bd788c3004f33c9700b8b65432d5894164b46f",
"typeScriptVersion": "4.5"
"dependencies": {
"undici-types": "~5.26.4"
},
"typesPublisherContentHash": "16184642b8bb9cb6f84a0d6245e7b26fc0133a47f604465cfae9c1ace3eeb2ba",
"typeScriptVersion": "4.5",
"nonNpm": true
}

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

import { AsyncResource } from "node:async_hooks";
type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns";
type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns" | "net";
interface NodeGCPerformanceDetail {

@@ -37,0 +37,0 @@ /**

@@ -5,3 +5,3 @@ # Installation

# Summary
This package contains type definitions for Node.js (https://nodejs.org/).
This package contains type definitions for node (https://nodejs.org/).

@@ -12,7 +12,6 @@ # Details

### Additional Details
* Last updated: Sat, 30 Sep 2023 08:35:04 GMT
* Dependencies: none
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
* Last updated: Tue, 31 Oct 2023 08:42:08 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
# Credits
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
declare module "stream/consumers" {
import { Blob as NodeBlob } from "node:buffer";
import { Readable } from "node:stream";
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<NodeBlob>;
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<Buffer>;
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<string>;
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<ArrayBuffer>;
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<NodeBlob>;
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<unknown>;
}

@@ -10,0 +10,0 @@ declare module "node:stream/consumers" {

@@ -1381,3 +1381,3 @@ /**

function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
export { dot, Spec as spec, tap, junit, TestEvent };
export { dot, junit, Spec as spec, tap, TestEvent };
}

@@ -323,2 +323,60 @@ // Declare "static" methods in Error

}
namespace fetch {
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").RequestInit;
type Request = globalThis.Request;
type Response = globalThis.Response;
type Headers = globalThis.Headers;
type FormData = globalThis.FormData;
type RequestInit = globalThis.RequestInit;
type RequestInfo = import("undici-types").RequestInfo;
type HeadersInit = import("undici-types").HeadersInit;
type BodyInit = import("undici-types").BodyInit;
type RequestRedirect = import("undici-types").RequestRedirect;
type RequestCredentials = import("undici-types").RequestCredentials;
type RequestMode = import("undici-types").RequestMode;
type ReferrerPolicy = import("undici-types").ReferrerPolicy;
type Dispatcher = import("undici-types").Dispatcher;
type RequestDuplex = import("undici-types").RequestDuplex;
}
}
interface RequestInit extends NodeJS.fetch._RequestInit {}
declare function fetch(
input: NodeJS.fetch.RequestInfo,
init?: RequestInit,
): Promise<Response>;
interface Request extends NodeJS.fetch._Request {}
declare var Request: typeof globalThis extends {
onmessage: any;
Request: infer T;
} ? T
: typeof import("undici-types").Request;
interface Response extends NodeJS.fetch._Response {}
declare var Response: typeof globalThis extends {
onmessage: any;
Response: infer T;
} ? T
: typeof import("undici-types").Response;
interface FormData extends NodeJS.fetch._FormData {}
declare var FormData: typeof globalThis extends {
onmessage: any;
FormData: infer T;
} ? T
: typeof import("undici-types").FormData;
interface Headers extends NodeJS.fetch._Headers {}
declare var Headers: typeof globalThis extends {
onmessage: any;
Headers: infer T;
} ? T
: typeof import("undici-types").Headers;

@@ -270,8 +270,10 @@ /**

*
* @param specified The module specifier to resolve relative to the current module.
* @since v20.6.0
*
* @param specifier The module specifier to resolve relative to the current module.
* @returns The absolute (`file:`) URL string for the resolved module.
*/
resolve(specified: string): string;
resolve(specifier: string): string;
/**
* This feature is only available with the `--experimental-import-meta-resolve`
* This `parent` parameter is only used when the `--experimental-import-meta-resolve`
* command flag enabled.

@@ -282,7 +284,9 @@ *

*
* @param specified The module specifier to resolve relative to `parent`.
* @since v20.6.0
*
* @param specifier The module specifier to resolve relative to `parent`.
* @param parent The absolute parent module URL to resolve from.
* @returns The absolute (`file:`) URL string for the resolved module.
*/
resolve(specified: string, parent: string | URL): string;
resolve(specifier: string, parent: string | URL): string;
}

@@ -289,0 +293,0 @@ }

@@ -95,2 +95,8 @@ /**

/**
* Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately.
* If the socket is still writable it implicitly calls `socket.end()`.
* @since v0.3.4
*/
destroySoon(): void;
/**
* Sends data on the socket. The second parameter specifies the encoding in the

@@ -97,0 +103,0 @@ * case of a string. It defaults to UTF8 encoding.

@@ -41,3 +41,3 @@ /**

gid: number;
shell: T;
shell: T | null;
homedir: T;

@@ -44,0 +44,0 @@ }

declare module "stream/consumers" {
import { Blob as NodeBlob } from "node:buffer";
import { Readable } from "node:stream";
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<NodeBlob>;
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<Buffer>;
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<string>;
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<ArrayBuffer>;
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<NodeBlob>;
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterable<any>): Promise<unknown>;
}

@@ -10,0 +10,0 @@ declare module "node:stream/consumers" {

@@ -1381,3 +1381,3 @@ /**

function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
export { dot, Spec as spec, tap, junit, TestEvent };
export { dot, junit, Spec as spec, tap, TestEvent };
}

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