@types/node
Advanced tools
Comparing version 16.18.113 to 16.18.114
@@ -246,3 +246,3 @@ /** | ||
options?: StaticEventEmitterOptions, | ||
): AsyncIterableIterator<any>; | ||
): NodeJS.AsyncIterator<any>; | ||
/** | ||
@@ -249,0 +249,0 @@ * A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`. |
@@ -30,2 +30,4 @@ // Declare "static" methods in Error | ||
declare var global: typeof globalThis; | ||
declare var __filename: string; | ||
@@ -86,27 +88,2 @@ declare var __dirname: string; | ||
// #region ArrayLike.at() | ||
interface RelativeIndexable<T> { | ||
/** | ||
* Takes an integer value and returns the item at that index, | ||
* allowing for positive and negative integers. | ||
* Negative integers count back from the last item in the array. | ||
*/ | ||
at(index: number): T | undefined; | ||
} | ||
interface String extends RelativeIndexable<string> {} | ||
interface Array<T> extends RelativeIndexable<T> {} | ||
interface ReadonlyArray<T> extends RelativeIndexable<T> {} | ||
interface Int8Array extends RelativeIndexable<number> {} | ||
interface Uint8Array extends RelativeIndexable<number> {} | ||
interface Uint8ClampedArray extends RelativeIndexable<number> {} | ||
interface Int16Array extends RelativeIndexable<number> {} | ||
interface Uint16Array extends RelativeIndexable<number> {} | ||
interface Int32Array extends RelativeIndexable<number> {} | ||
interface Uint32Array extends RelativeIndexable<number> {} | ||
interface Float32Array extends RelativeIndexable<number> {} | ||
interface Float64Array extends RelativeIndexable<number> {} | ||
interface BigInt64Array extends RelativeIndexable<bigint> {} | ||
interface BigUint64Array extends RelativeIndexable<bigint> {} | ||
// #endregion ArrayLike.at() end | ||
/*----------------------------------------------* | ||
@@ -210,3 +187,3 @@ * * | ||
wrap(oldStream: ReadableStream): this; | ||
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>; | ||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<string | Buffer>; | ||
} | ||
@@ -280,2 +257,14 @@ | ||
} | ||
/** An iterable iterator returned by the Node.js API. */ | ||
// Default TReturn/TNext in v16 is `any`, for compatibility with the previously-used IterableIterator. | ||
interface Iterator<T, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> { | ||
[Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>; | ||
} | ||
/** An async iterable iterator returned by the Node.js API. */ | ||
// Default TReturn/TNext in v16 is `any`, for compatibility with the previously-used AsyncIterableIterator. | ||
interface AsyncIterator<T, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> { | ||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>; | ||
} | ||
} |
@@ -25,18 +25,18 @@ /** | ||
// NOTE: These definitions support NodeJS and TypeScript 5.7+. | ||
// NOTE: These definitions support Node.js and TypeScript 5.7+. | ||
// Reference required types from the default lib: | ||
// Reference required TypeScript libs: | ||
/// <reference lib="es2020" /> | ||
/// <reference lib="esnext.asynciterable" /> | ||
/// <reference lib="esnext.intl" /> | ||
/// <reference lib="esnext.bigint" /> | ||
// Definitions specific to TypeScript 5.7+ | ||
// TypeScript backwards-compatibility definitions: | ||
/// <reference path="compatibility/index.d.ts" /> | ||
// Definitions specific to TypeScript 5.7+: | ||
/// <reference path="globals.typedarray.d.ts" /> | ||
/// <reference path="buffer.buffer.d.ts" /> | ||
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: | ||
// Definitions for Node.js modules that are not specific to any version of TypeScript: | ||
/// <reference path="globals.d.ts" /> | ||
/// <reference path="assert.d.ts" /> | ||
/// <reference path="assert/strict.d.ts" /> | ||
/// <reference path="globals.d.ts" /> | ||
/// <reference path="async_hooks.d.ts" /> | ||
@@ -90,3 +90,1 @@ /// <reference path="buffer.d.ts" /> | ||
/// <reference path="zlib.d.ts" /> | ||
/// <reference path="globals.global.d.ts" /> |
{ | ||
"name": "@types/node", | ||
"version": "16.18.113", | ||
"version": "16.18.114", | ||
"description": "TypeScript definitions for node", | ||
@@ -220,4 +220,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "1e0f18d2dfeb3fd68763b84d37a7c2dc4a5f7bd87a74300d4179ed6538be4477", | ||
"typesPublisherContentHash": "72c1ffba5c5f5cd85ebe5326dd9c6fea84da72d1638c5e9d731f17abb774fd90", | ||
"typeScriptVersion": "4.8" | ||
} |
@@ -317,3 +317,3 @@ /** | ||
prependOnceListener(event: "history", listener: (history: string[]) => void): this; | ||
[Symbol.asyncIterator](): AsyncIterableIterator<string>; | ||
[Symbol.asyncIterator](): NodeJS.AsyncIterator<string>; | ||
} | ||
@@ -320,0 +320,0 @@ type ReadLine = Interface; // type forwarded for backwards compatibility |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 07 Oct 2024 22:07:58 GMT | ||
* Last updated: Wed, 16 Oct 2024 23:36:24 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ |
@@ -157,2 +157,6 @@ declare module "stream/web" { | ||
interface ReadableStreamAsyncIterator<T> extends NodeJS.AsyncIterator<T, NodeJS.BuiltinIteratorReturn, unknown> { | ||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>; | ||
} | ||
/** This Streams API interface represents a readable stream of byte data. */ | ||
@@ -166,4 +170,4 @@ interface ReadableStream<R = any> { | ||
tee(): [ReadableStream<R>, ReadableStream<R>]; | ||
values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>; | ||
[Symbol.asyncIterator](): AsyncIterableIterator<R>; | ||
values(options?: { preventCancel?: boolean }): ReadableStreamAsyncIterator<R>; | ||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<R>; | ||
} | ||
@@ -170,0 +174,0 @@ |
@@ -25,18 +25,18 @@ /** | ||
// NOTE: These definitions support NodeJS and TypeScript 4.9 through 5.6. | ||
// NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6. | ||
// Reference required types from the default lib: | ||
// Reference required TypeScript libs: | ||
/// <reference lib="es2020" /> | ||
/// <reference lib="esnext.asynciterable" /> | ||
/// <reference lib="esnext.intl" /> | ||
/// <reference lib="esnext.bigint" /> | ||
// Definitions specific to TypeScript 4.9 through 5.6 | ||
// TypeScript backwards-compatibility definitions: | ||
/// <reference path="../compatibility/index.d.ts" /> | ||
// Definitions specific to TypeScript 4.9 through 5.6: | ||
/// <reference path="./globals.typedarray.d.ts" /> | ||
/// <reference path="./buffer.buffer.d.ts" /> | ||
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript: | ||
// Definitions for Node.js modules that are not specific to any version of TypeScript: | ||
/// <reference path="../globals.d.ts" /> | ||
/// <reference path="../assert.d.ts" /> | ||
/// <reference path="../assert/strict.d.ts" /> | ||
/// <reference path="../globals.d.ts" /> | ||
/// <reference path="../async_hooks.d.ts" /> | ||
@@ -90,3 +90,1 @@ /// <reference path="../buffer.d.ts" /> | ||
/// <reference path="../zlib.d.ts" /> | ||
/// <reference path="../globals.global.d.ts" /> |
@@ -690,2 +690,5 @@ /** | ||
} | ||
interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> { | ||
[Symbol.iterator](): URLSearchParamsIterator<T>; | ||
} | ||
/** | ||
@@ -759,3 +762,3 @@ * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the | ||
*/ | ||
entries(): IterableIterator<[string, string]>; | ||
entries(): URLSearchParamsIterator<[string, string]>; | ||
/** | ||
@@ -808,3 +811,3 @@ * Iterates over each name-value pair in the query and invokes the given function. | ||
*/ | ||
keys(): IterableIterator<string>; | ||
keys(): URLSearchParamsIterator<string>; | ||
/** | ||
@@ -854,4 +857,4 @@ * Sets the value in the `URLSearchParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`, | ||
*/ | ||
values(): IterableIterator<string>; | ||
[Symbol.iterator](): IterableIterator<[string, string]>; | ||
values(): URLSearchParamsIterator<string>; | ||
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>; | ||
} | ||
@@ -858,0 +861,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1837529
63
41128