@types/node 20.12.0 → 20.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 30 Mar 2024 04:35:27 GMT
11
+ * Last updated: Sat, 30 Mar 2024 05:35:18 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/dom-events.d.ts CHANGED
@@ -89,6 +89,8 @@ interface AddEventListenerOptions extends EventListenerOptions {
89
89
  once?: boolean;
90
90
  /** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
91
91
  passive?: boolean;
92
+ /** The listener will be removed when the given AbortSignal object's `abort()` method is called. */
93
+ signal?: AbortSignal;
92
94
  }
93
95
 
94
96
  interface EventListener {
node/events.d.ts CHANGED
@@ -75,10 +75,6 @@ declare module "events" {
75
75
  */
76
76
  captureRejections?: boolean | undefined;
77
77
  }
78
- // Any EventTarget with a Node-style `once` function
79
- interface _NodeEventTarget {
80
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
81
- }
82
78
  // Any EventTarget with a DOM-style `addEventListener`
83
79
  interface _DOMEventTarget {
84
80
  addEventListener(
@@ -208,7 +204,7 @@ declare module "events" {
208
204
  * @since v11.13.0, v10.16.0
209
205
  */
210
206
  static once(
211
- emitter: _NodeEventTarget,
207
+ emitter: NodeJS.EventEmitter,
212
208
  eventName: string | symbol,
213
209
  options?: StaticEventEmitterOptions,
214
210
  ): Promise<any[]>;
@@ -720,7 +716,7 @@ declare module "events" {
720
716
  * Returns a reference to the `EventEmitter`, so that calls can be chained.
721
717
  * @since v0.1.26
722
718
  */
723
- removeAllListeners(event?: Key<unknown, T>): this;
719
+ removeAllListeners(eventName?: Key<unknown, T>): this;
724
720
  /**
725
721
  * By default `EventEmitter`s will print a warning if more than `10` listeners are
726
722
  * added for a particular event. This is a useful default that helps finding
node/fs/promises.d.ts CHANGED
@@ -1008,6 +1008,12 @@ declare module "fs/promises" {
1008
1008
  | (ObjectEncodingOptions & {
1009
1009
  mode?: Mode | undefined;
1010
1010
  flag?: OpenMode | undefined;
1011
+ /**
1012
+ * If all data is successfully written to the file, and `flush`
1013
+ * is `true`, `filehandle.sync()` is used to flush the data.
1014
+ * @default false
1015
+ */
1016
+ flush?: boolean | undefined;
1011
1017
  } & Abortable)
1012
1018
  | BufferEncoding
1013
1019
  | null,
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.12.0",
3
+ "version": "20.12.2",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~5.26.4"
214
214
  },
215
- "typesPublisherContentHash": "c3429c6538fb2d25096eb610dc4ca612cad0b8c7c007c7898c20ae20cb6b7ded",
215
+ "typesPublisherContentHash": "87dfc7f77cdee3468250d81c9d0a1affd373ef091004a961696e12cd422beb71",
216
216
  "typeScriptVersion": "4.7"
217
217
  }