Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1968
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.4.2 to 20.4.4

29

node/events.d.ts

@@ -298,3 +298,32 @@ /**

/**
* Returns the currently set max amount of listeners.
*
* For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
* the emitter.
*
* For `EventTarget`s this is the only way to get the max event listeners for the
* event target. If the number of event handlers on a single EventTarget exceeds
* the max set, the EventTarget will print a warning.
*
* ```js
* import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
*
* {
* const ee = new EventEmitter();
* console.log(getMaxListeners(ee)); // 10
* setMaxListeners(11, ee);
* console.log(getMaxListeners(ee)); // 11
* }
* {
* const et = new EventTarget();
* console.log(getMaxListeners(et)); // 10
* setMaxListeners(11, et);
* console.log(getMaxListeners(et)); // 11
* }
* ```
* @since v19.9.0
*/
static getMaxListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter): number;
/**
* ```js
* import { setMaxListeners, EventEmitter } from 'node:events';

@@ -301,0 +330,0 @@ *

9

node/fs/promises.d.ts

@@ -85,2 +85,9 @@ /**

}
interface ReadableWebStreamOptions {
/**
* Whether to open a normal or a `'bytes'` stream.
* @since v20.0.0
*/
type?: 'bytes' | undefined;
}
// TODO: Add `EventEmitter` close

@@ -244,3 +251,3 @@ interface FileHandle {

*/
readableWebStream(): ReadableStream;
readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
/**

@@ -247,0 +254,0 @@ * Asynchronously reads the entire contents of a file.

4

node/package.json
{
"name": "@types/node",
"version": "20.4.2",
"version": "20.4.4",
"description": "TypeScript definitions for Node.js",

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

"dependencies": {},
"typesPublisherContentHash": "8ccebbf79ef4c9ade9cde2b505492190d140170bf4372bb3fe1ebd36e9344eac",
"typesPublisherContentHash": "3855eba1e7ca267925b74e739e5e432e9cc50d4b0e66091d7500d97ce36348d8",
"typeScriptVersion": "4.3"
}

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

### Additional Details
* Last updated: Wed, 12 Jul 2023 23:02:41 GMT
* Last updated: Sat, 22 Jul 2023 12:32:49 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`

@@ -298,3 +298,32 @@ /**

/**
* Returns the currently set max amount of listeners.
*
* For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
* the emitter.
*
* For `EventTarget`s this is the only way to get the max event listeners for the
* event target. If the number of event handlers on a single EventTarget exceeds
* the max set, the EventTarget will print a warning.
*
* ```js
* import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
*
* {
* const ee = new EventEmitter();
* console.log(getMaxListeners(ee)); // 10
* setMaxListeners(11, ee);
* console.log(getMaxListeners(ee)); // 11
* }
* {
* const et = new EventTarget();
* console.log(getMaxListeners(et)); // 10
* setMaxListeners(11, et);
* console.log(getMaxListeners(et)); // 11
* }
* ```
* @since v19.9.0
*/
static getMaxListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter): number;
/**
* ```js
* import { setMaxListeners, EventEmitter } from 'node:events';

@@ -301,0 +330,0 @@ *

@@ -85,2 +85,9 @@ /**

}
interface ReadableWebStreamOptions {
/**
* Whether to open a normal or a `'bytes'` stream.
* @since v20.0.0
*/
type?: 'bytes' | undefined;
}
// TODO: Add `EventEmitter` close

@@ -244,3 +251,3 @@ interface FileHandle {

*/
readableWebStream(): ReadableStream;
readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
/**

@@ -725,3 +732,4 @@ * Asynchronously reads the entire contents of a file.

* path to be absolute. When using `'junction'`, the `target` argument will
* automatically be normalized to absolute path.
* automatically be normalized to absolute path. Junction points on NTFS volumes
* can only point to directories.
* @since v10.0.0

@@ -728,0 +736,0 @@ * @param [type='null']

@@ -397,2 +397,16 @@ /**

static revokeObjectURL(objectUrl: string): void;
/**
* Checks if an `input` relative to the `base` can be parsed to a `URL`.
*
* ```js
* const isValid = URL.canParse('/foo', 'https://example.org/'); // true
*
* const isNotValid = URL.canParse('/foo'); // false
* ```
* @since v19.9.0
* @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
* `converted to a string` first.
* @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
*/
static canParse(input: string, base?: string): boolean;
constructor(input: string, base?: string | URL);

@@ -399,0 +413,0 @@ /**

@@ -397,2 +397,16 @@ /**

static revokeObjectURL(objectUrl: string): void;
/**
* Checks if an `input` relative to the `base` can be parsed to a `URL`.
*
* ```js
* const isValid = URL.canParse('/foo', 'https://example.org/'); // true
*
* const isNotValid = URL.canParse('/foo'); // false
* ```
* @since v19.9.0
* @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
* `converted to a string` first.
* @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
*/
static canParse(input: string, base?: string): boolean;
constructor(input: string, base?: string | URL);

@@ -399,0 +413,0 @@ /**

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