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 18.19.47 to 18.19.48

99

node v18.19/globals.d.ts

@@ -10,2 +10,3 @@ export {}; // Make this a module

type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _MessageEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").MessageEvent;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}

@@ -17,2 +18,72 @@ : import("undici-types").RequestInit;

// #region DOMException
type _DOMException = typeof globalThis extends { onmessage: any } ? {} : NodeDOMException;
interface NodeDOMException extends Error {
/**
* @deprecated
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
*/
readonly code: number;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
readonly message: string;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
readonly name: string;
readonly INDEX_SIZE_ERR: 1;
readonly DOMSTRING_SIZE_ERR: 2;
readonly HIERARCHY_REQUEST_ERR: 3;
readonly WRONG_DOCUMENT_ERR: 4;
readonly INVALID_CHARACTER_ERR: 5;
readonly NO_DATA_ALLOWED_ERR: 6;
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
readonly NOT_FOUND_ERR: 8;
readonly NOT_SUPPORTED_ERR: 9;
readonly INUSE_ATTRIBUTE_ERR: 10;
readonly INVALID_STATE_ERR: 11;
readonly SYNTAX_ERR: 12;
readonly INVALID_MODIFICATION_ERR: 13;
readonly NAMESPACE_ERR: 14;
readonly INVALID_ACCESS_ERR: 15;
readonly VALIDATION_ERR: 16;
readonly TYPE_MISMATCH_ERR: 17;
readonly SECURITY_ERR: 18;
readonly NETWORK_ERR: 19;
readonly ABORT_ERR: 20;
readonly URL_MISMATCH_ERR: 21;
readonly QUOTA_EXCEEDED_ERR: 22;
readonly TIMEOUT_ERR: 23;
readonly INVALID_NODE_TYPE_ERR: 24;
readonly DATA_CLONE_ERR: 25;
}
interface NodeDOMExceptionConstructor {
prototype: DOMException;
new(message?: string, nameOrOptions?: string | { name?: string; cause?: unknown }): DOMException;
readonly INDEX_SIZE_ERR: 1;
readonly DOMSTRING_SIZE_ERR: 2;
readonly HIERARCHY_REQUEST_ERR: 3;
readonly WRONG_DOCUMENT_ERR: 4;
readonly INVALID_CHARACTER_ERR: 5;
readonly NO_DATA_ALLOWED_ERR: 6;
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
readonly NOT_FOUND_ERR: 8;
readonly NOT_SUPPORTED_ERR: 9;
readonly INUSE_ATTRIBUTE_ERR: 10;
readonly INVALID_STATE_ERR: 11;
readonly SYNTAX_ERR: 12;
readonly INVALID_MODIFICATION_ERR: 13;
readonly NAMESPACE_ERR: 14;
readonly INVALID_ACCESS_ERR: 15;
readonly VALIDATION_ERR: 16;
readonly TYPE_MISMATCH_ERR: 17;
readonly SECURITY_ERR: 18;
readonly NETWORK_ERR: 19;
readonly ABORT_ERR: 20;
readonly URL_MISMATCH_ERR: 21;
readonly QUOTA_EXCEEDED_ERR: 22;
readonly TIMEOUT_ERR: 23;
readonly INVALID_NODE_TYPE_ERR: 24;
readonly DATA_CLONE_ERR: 25;
}
// #endregion DOMException
declare global {

@@ -161,2 +232,20 @@ // Declare "static" methods in Error

// #region DOMException
/**
* @since v17.0.0
* An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
*/
interface DOMException extends _DOMException {}
/**
* @since v17.0.0
*
* The WHATWG `DOMException` class. See [DOMException](https://developer.mozilla.org/docs/Web/API/DOMException) for more details.
*/
var DOMException: typeof globalThis extends { onmessage: any; DOMException: infer T } ? T
: NodeDOMExceptionConstructor;
// #endregion DOMException
/*----------------------------------------------*

@@ -381,2 +470,12 @@ * *

: typeof import("undici-types").Headers;
interface MessageEvent extends _MessageEvent {}
/**
* @since v15.0.0
*/
var MessageEvent: typeof globalThis extends {
onmessage: any;
MessageEvent: infer T;
} ? T
: typeof import("undici-types").MessageEvent;
}

4

node v18.19/package.json
{
"name": "@types/node",
"version": "18.19.47",
"version": "18.19.48",
"description": "TypeScript definitions for node",

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

},
"typesPublisherContentHash": "d1f247a2b67ea5d8676a67452a9d6d88919b6c5938bf06bf1e6f689cf3b02713",
"typesPublisherContentHash": "5ce9cffaeee72821d1d992438407df2493e219642e4b4d833ac5a9ef3b70161c",
"typeScriptVersion": "4.8"
}

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

### Additional Details
* Last updated: Wed, 28 Aug 2024 00:27:14 GMT
* Last updated: Sun, 01 Sep 2024 12:10:27 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

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

@@ -0,1 +1,36 @@

type _ByteLengthQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ByteLengthQueuingStrategy;
type _CompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
: import("stream/web").CompressionStream;
type _CountQueuingStrategy = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").CountQueuingStrategy;
type _DecompressionStream = typeof globalThis extends { onmessage: any; ReportingObserver: any } ? {}
: import("stream/web").DecompressionStream;
type _ReadableByteStreamController = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ReadableByteStreamController;
type _ReadableStream<R = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ReadableStream<R>;
type _ReadableStreamBYOBReader = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ReadableStreamBYOBReader;
type _ReadableStreamBYOBRequest = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ReadableStreamBYOBRequest;
type _ReadableStreamDefaultController<R = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ReadableStreamDefaultController<R>;
type _ReadableStreamDefaultReader<R = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").ReadableStreamDefaultReader<R>;
type _TextDecoderStream = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").TextDecoderStream;
type _TextEncoderStream = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").TextEncoderStream;
type _TransformStream<I = any, O = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").TransformStream<I, O>;
type _TransformStreamDefaultController<O = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").TransformStreamDefaultController<O>;
type _WritableStream<W = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").WritableStream<W>;
type _WritableStreamDefaultController = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").WritableStreamDefaultController;
type _WritableStreamDefaultWriter<W = any> = typeof globalThis extends { onmessage: any } ? {}
: import("stream/web").WritableStreamDefaultWriter<W>;
declare module "stream/web" {

@@ -68,14 +103,12 @@ // stub module, pending copy&paste from .d.ts or manual impl

}
interface ReadableStreamDefaultReadValueResult<T> {
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
interface ReadableStreamReadValueResult<T> {
done: false;
value: T;
}
interface ReadableStreamDefaultReadDoneResult {
interface ReadableStreamReadDoneResult<T> {
done: true;
value?: undefined;
value?: T;
}
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
type ReadableStreamDefaultReadResult<T> =
| ReadableStreamDefaultReadValueResult<T>
| ReadableStreamDefaultReadDoneResult;
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
interface ReadableByteStreamControllerCallback {

@@ -141,3 +174,5 @@ (controller: ReadableByteStreamController): void | PromiseLike<void>;

cancel(reason?: any): Promise<void>;
getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
getReader(): ReadableStreamDefaultReader<R>;
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;

@@ -154,6 +189,23 @@ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;

};
type ReadableStreamReaderMode = "byob";
interface ReadableStreamGetReaderOptions {
/**
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
*
* This call behaves the same way as the no-argument variant, except that it only works on readable byte streams, i.e. streams which were constructed specifically with the ability to handle "bring your own buffer" reading. The returned BYOB reader provides the ability to directly read individual chunks from the stream via its read() method, into developer-supplied buffers, allowing more precise control over allocation.
*/
mode?: ReadableStreamReaderMode;
}
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
read(): Promise<ReadableStreamDefaultReadResult<R>>;
read(): Promise<ReadableStreamReadResult<R>>;
releaseLock(): void;
}
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
releaseLock(): void;
}
const ReadableStreamDefaultReader: {

@@ -163,4 +215,19 @@ prototype: ReadableStreamDefaultReader;

};
const ReadableStreamBYOBReader: any;
const ReadableStreamBYOBRequest: any;
const ReadableStreamBYOBReader: {
prototype: ReadableStreamBYOBReader;
new(stream: ReadableStream): ReadableStreamBYOBReader;
};
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
interface ReadableStreamBYOBRequest {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
readonly view: ArrayBufferView | null;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
respond(bytesWritten: number): void;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
respondWithNewView(view: ArrayBufferView): void;
}
const ReadableStreamBYOBRequest: {
prototype: ReadableStreamBYOBRequest;
new(): ReadableStreamBYOBRequest;
};
interface ReadableByteStreamController {

@@ -337,18 +404,119 @@ readonly byobRequest: undefined;

};
interface CompressionStream<R = any, W = any> {
readonly readable: ReadableStream<R>;
readonly writable: WritableStream<W>;
interface CompressionStream {
readonly readable: ReadableStream;
readonly writable: WritableStream;
}
const CompressionStream: {
prototype: CompressionStream;
new<R = any, W = any>(format: string): CompressionStream<R, W>;
new(format: "deflate" | "deflate-raw" | "gzip"): CompressionStream;
};
interface DecompressionStream<R = any, W = any> {
readonly readable: ReadableStream<R>;
readonly writable: WritableStream<W>;
interface DecompressionStream {
readonly writable: WritableStream;
readonly readable: ReadableStream;
}
const DecompressionStream: {
prototype: DecompressionStream;
new<R = any, W = any>(format: string): DecompressionStream<R, W>;
new(format: "deflate" | "deflate-raw" | "gzip"): DecompressionStream;
};
global {
interface ByteLengthQueuingStrategy extends _ByteLengthQueuingStrategy {}
var ByteLengthQueuingStrategy: typeof globalThis extends { onmessage: any; ByteLengthQueuingStrategy: infer T }
? T
: typeof import("stream/web").ByteLengthQueuingStrategy;
interface CompressionStream extends _CompressionStream {}
var CompressionStream: typeof globalThis extends {
onmessage: any;
// CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit.
// If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts
ReportingObserver: any;
CompressionStream: infer T;
} ? T
// TS 4.8, 4.9, 5.0
: typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? {
prototype: T;
new(format: "deflate" | "deflate-raw" | "gzip"): T;
}
: typeof import("stream/web").CompressionStream;
interface CountQueuingStrategy extends _CountQueuingStrategy {}
var CountQueuingStrategy: typeof globalThis extends { onmessage: any; CountQueuingStrategy: infer T } ? T
: typeof import("stream/web").CountQueuingStrategy;
interface DecompressionStream extends _DecompressionStream {}
var DecompressionStream: typeof globalThis extends {
onmessage: any;
// CompressionStream, DecompressionStream and ReportingObserver was introduced in the same commit.
// If ReportingObserver check is removed, the type here will form a circular reference in TS5.0+lib.dom.d.ts
ReportingObserver: any;
DecompressionStream: infer T;
} ? T
// TS 4.8, 4.9, 5.0
: typeof globalThis extends { onmessage: any; TransformStream: { prototype: infer T } } ? {
prototype: T;
new(format: "deflate" | "deflate-raw" | "gzip"): T;
}
: typeof import("stream/web").DecompressionStream;
interface ReadableByteStreamController extends _ReadableByteStreamController {}
var ReadableByteStreamController: typeof globalThis extends
{ onmessage: any; ReadableByteStreamController: infer T } ? T
: typeof import("stream/web").ReadableByteStreamController;
interface ReadableStream<R = any> extends _ReadableStream<R> {}
var ReadableStream: typeof globalThis extends { onmessage: any; ReadableStream: infer T } ? T
: typeof import("stream/web").ReadableStream;
interface ReadableStreamBYOBReader extends _ReadableStreamBYOBReader {}
var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T }
? T
: typeof import("stream/web").ReadableStreamBYOBReader;
interface ReadableStreamBYOBRequest extends _ReadableStreamBYOBRequest {}
var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T }
? T
: typeof import("stream/web").ReadableStreamBYOBRequest;
interface ReadableStreamDefaultController<R = any> extends _ReadableStreamDefaultController<R> {}
var ReadableStreamDefaultController: typeof globalThis extends
{ onmessage: any; ReadableStreamDefaultController: infer T } ? T
: typeof import("stream/web").ReadableStreamDefaultController;
interface ReadableStreamDefaultReader<R = any> extends _ReadableStreamDefaultReader<R> {}
var ReadableStreamDefaultReader: typeof globalThis extends
{ onmessage: any; ReadableStreamDefaultReader: infer T } ? T
: typeof import("stream/web").ReadableStreamDefaultReader;
interface TextDecoderStream extends _TextDecoderStream {}
var TextDecoderStream: typeof globalThis extends { onmessage: any; TextDecoderStream: infer T } ? T
: typeof import("stream/web").TextDecoderStream;
interface TextEncoderStream extends _TextEncoderStream {}
var TextEncoderStream: typeof globalThis extends { onmessage: any; TextEncoderStream: infer T } ? T
: typeof import("stream/web").TextEncoderStream;
interface TransformStream<I = any, O = any> extends _TransformStream<I, O> {}
var TransformStream: typeof globalThis extends { onmessage: any; TransformStream: infer T } ? T
: typeof import("stream/web").TransformStream;
interface TransformStreamDefaultController<O = any> extends _TransformStreamDefaultController<O> {}
var TransformStreamDefaultController: typeof globalThis extends
{ onmessage: any; TransformStreamDefaultController: infer T } ? T
: typeof import("stream/web").TransformStreamDefaultController;
interface WritableStream<W = any> extends _WritableStream<W> {}
var WritableStream: typeof globalThis extends { onmessage: any; WritableStream: infer T } ? T
: typeof import("stream/web").WritableStream;
interface WritableStreamDefaultController extends _WritableStreamDefaultController {}
var WritableStreamDefaultController: typeof globalThis extends
{ onmessage: any; WritableStreamDefaultController: infer T } ? T
: typeof import("stream/web").WritableStreamDefaultController;
interface WritableStreamDefaultWriter<W = any> extends _WritableStreamDefaultWriter<W> {}
var WritableStreamDefaultWriter: typeof globalThis extends
{ onmessage: any; WritableStreamDefaultWriter: infer T } ? T
: typeof import("stream/web").WritableStreamDefaultWriter;
}
}

@@ -355,0 +523,0 @@ declare module "node:stream/web" {

@@ -318,35 +318,35 @@ /**

* This function is used to create a hook running before subtest of the current test.
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
* the second argument. Default: A no-op function.
* @param fn The hook function. The first argument to this function is a `TestContext` object.
* If the hook uses callbacks, the callback function is passed as the second argument.
* @param options Configuration options for the hook.
* @since v18.17.0
*/
before: typeof before;
before(fn?: TestContextHookFn, options?: HookOptions): void;
/**
* This function is used to create a hook running before each subtest of the current test.
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
* the second argument. Default: A no-op function.
* @param fn The hook function. The first argument to this function is a `TestContext` object.
* If the hook uses callbacks, the callback function is passed as the second argument.
* @param options Configuration options for the hook.
* @since v18.8.0
*/
beforeEach: typeof beforeEach;
beforeEach(fn?: TestContextHookFn, options?: HookOptions): void;
/**
* This function is used to create a hook that runs after the current test finishes.
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
* the second argument. Default: A no-op function.
* @param fn The hook function. The first argument to this function is a `TestContext` object.
* If the hook uses callbacks, the callback function is passed as the second argument.
* @param options Configuration options for the hook.
* @since v18.13.0
*/
after: typeof after;
after(fn?: TestContextHookFn, options?: HookOptions): void;
/**
* This function is used to create a hook running after each subtest of the current test.
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
* the second argument. Default: A no-op function.
* @param fn The hook function. The first argument to this function is a `TestContext` object.
* If the hook uses callbacks, the callback function is passed as the second argument.
* @param options Configuration options for the hook.
* @since v18.8.0
*/
afterEach: typeof afterEach;
afterEach(fn?: TestContextHookFn, options?: HookOptions): void;

@@ -521,8 +521,14 @@ /**

/**
* The hook function. If the hook uses callbacks, the callback function is passed as the
* second argument.
* The hook function. The first argument is the context in which the hook is called.
* If the hook uses callbacks, the callback function is passed as the second argument.
*/
type HookFn = (s: SuiteContext, done: (result?: any) => void) => any;
type HookFn = (c: TestContext | SuiteContext, done: (result?: any) => void) => any;
/**
* The hook function. The first argument is a `TestContext` object.
* If the hook uses callbacks, the callback function is passed as the second argument.
*/
type TestContextHookFn = (t: TestContext, done: (result?: any) => void) => any;
/**
* Configuration options for hooks.

@@ -529,0 +535,0 @@ * @since v18.8.0

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