@types/node 18.19.103 → 18.19.105
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 v18.19/README.md +1 -1
- node v18.19/dom-events.d.ts +44 -85
- node v18.19/package.json +2 -2
- node v18.19/stream.d.ts +6 -0
node v18.19/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/v18.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 28 May 2025 17:35:19 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node v18.19/dom-events.d.ts
CHANGED
|
@@ -1,77 +1,45 @@
|
|
|
1
|
-
|
|
1
|
+
// Make this a module
|
|
2
|
+
export {};
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// from lib.dom.d.ts, then edited to reflect Node's documentation at
|
|
6
|
-
// https://nodejs.org/api/events.html#class-eventtarget.
|
|
7
|
-
// Please read that link to understand important implementation differences.
|
|
4
|
+
// Conditional type aliases, which are later merged into the global scope.
|
|
5
|
+
// Will either be empty if the relevant web library is already present, or the @types/node definition otherwise.
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
readonly isTrusted: boolean;
|
|
31
|
-
/** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
|
|
32
|
-
preventDefault(): void;
|
|
33
|
-
/** This is not used in Node.js and is provided purely for completeness. */
|
|
34
|
-
returnValue: boolean;
|
|
35
|
-
/** Alias for event.target. */
|
|
36
|
-
readonly srcElement: EventTarget | null;
|
|
37
|
-
/** Stops the invocation of event listeners after the current one completes. */
|
|
38
|
-
stopImmediatePropagation(): void;
|
|
39
|
-
/** This is not used in Node.js and is provided purely for completeness. */
|
|
40
|
-
stopPropagation(): void;
|
|
41
|
-
/** The `EventTarget` dispatching the event */
|
|
42
|
-
readonly target: EventTarget | null;
|
|
43
|
-
/** The millisecond timestamp when the Event object was created. */
|
|
44
|
-
readonly timeStamp: number;
|
|
45
|
-
/** Returns the type of event, e.g. "click", "hashchange", or "submit". */
|
|
46
|
-
readonly type: string;
|
|
47
|
-
};
|
|
7
|
+
type __Event = typeof globalThis extends { onmessage: any } ? {} : Event;
|
|
8
|
+
interface Event {
|
|
9
|
+
readonly bubbles: boolean;
|
|
10
|
+
cancelBubble: boolean;
|
|
11
|
+
readonly cancelable: boolean;
|
|
12
|
+
readonly composed: boolean;
|
|
13
|
+
composedPath(): [EventTarget?];
|
|
14
|
+
readonly currentTarget: EventTarget | null;
|
|
15
|
+
readonly defaultPrevented: boolean;
|
|
16
|
+
readonly eventPhase: 0 | 2;
|
|
17
|
+
initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
|
|
18
|
+
readonly isTrusted: boolean;
|
|
19
|
+
preventDefault(): void;
|
|
20
|
+
readonly returnValue: boolean;
|
|
21
|
+
readonly srcElement: EventTarget | null;
|
|
22
|
+
stopImmediatePropagation(): void;
|
|
23
|
+
stopPropagation(): void;
|
|
24
|
+
readonly target: EventTarget | null;
|
|
25
|
+
readonly timeStamp: number;
|
|
26
|
+
readonly type: string;
|
|
27
|
+
}
|
|
48
28
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
listener: EventListener | EventListenerObject,
|
|
64
|
-
options?: AddEventListenerOptions | boolean,
|
|
65
|
-
): void;
|
|
66
|
-
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
|
|
67
|
-
dispatchEvent(event: Event): boolean;
|
|
68
|
-
/** Removes the event listener in target's event listener list with the same type, callback, and options. */
|
|
69
|
-
removeEventListener(
|
|
70
|
-
type: string,
|
|
71
|
-
listener: EventListener | EventListenerObject,
|
|
72
|
-
options?: EventListenerOptions | boolean,
|
|
73
|
-
): void;
|
|
74
|
-
};
|
|
29
|
+
type __EventTarget = typeof globalThis extends { onmessage: any } ? {} : EventTarget;
|
|
30
|
+
interface EventTarget {
|
|
31
|
+
addEventListener(
|
|
32
|
+
type: string,
|
|
33
|
+
listener: EventListener | EventListenerObject,
|
|
34
|
+
options?: AddEventListenerOptions | boolean,
|
|
35
|
+
): void;
|
|
36
|
+
dispatchEvent(event: Event): boolean;
|
|
37
|
+
removeEventListener(
|
|
38
|
+
type: string,
|
|
39
|
+
listener: EventListener | EventListenerObject,
|
|
40
|
+
options?: EventListenerOptions | boolean,
|
|
41
|
+
): void;
|
|
42
|
+
}
|
|
75
43
|
|
|
76
44
|
interface EventInit {
|
|
77
45
|
bubbles?: boolean;
|
|
@@ -80,16 +48,12 @@ interface EventInit {
|
|
|
80
48
|
}
|
|
81
49
|
|
|
82
50
|
interface EventListenerOptions {
|
|
83
|
-
/** Not directly used by Node.js. Added for API completeness. Default: `false`. */
|
|
84
51
|
capture?: boolean;
|
|
85
52
|
}
|
|
86
53
|
|
|
87
54
|
interface AddEventListenerOptions extends EventListenerOptions {
|
|
88
|
-
/** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
|
|
89
55
|
once?: boolean;
|
|
90
|
-
/** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
|
|
91
56
|
passive?: boolean;
|
|
92
|
-
/** The listener will be removed when the given AbortSignal object's `abort()` method is called. */
|
|
93
57
|
signal?: AbortSignal;
|
|
94
58
|
}
|
|
95
59
|
|
|
@@ -101,24 +65,19 @@ interface EventListenerObject {
|
|
|
101
65
|
handleEvent(object: Event): void;
|
|
102
66
|
}
|
|
103
67
|
|
|
104
|
-
|
|
68
|
+
// Merge conditional interfaces into global scope, and conditionally declare global constructors.
|
|
105
69
|
declare global {
|
|
106
|
-
/** An event which takes place in the DOM. */
|
|
107
70
|
interface Event extends __Event {}
|
|
108
71
|
var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
|
|
109
72
|
: {
|
|
110
|
-
prototype:
|
|
111
|
-
new(type: string, eventInitDict?: EventInit):
|
|
73
|
+
prototype: Event;
|
|
74
|
+
new(type: string, eventInitDict?: EventInit): Event;
|
|
112
75
|
};
|
|
113
76
|
|
|
114
|
-
/**
|
|
115
|
-
* EventTarget is a DOM interface implemented by objects that can
|
|
116
|
-
* receive events and may have listeners for them.
|
|
117
|
-
*/
|
|
118
77
|
interface EventTarget extends __EventTarget {}
|
|
119
78
|
var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
|
|
120
79
|
: {
|
|
121
|
-
prototype:
|
|
122
|
-
new():
|
|
80
|
+
prototype: EventTarget;
|
|
81
|
+
new(): EventTarget;
|
|
123
82
|
};
|
|
124
83
|
}
|
node v18.19/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.19.
|
|
3
|
+
"version": "18.19.105",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -220,6 +220,6 @@
|
|
|
220
220
|
"undici-types": "~5.26.4"
|
|
221
221
|
},
|
|
222
222
|
"peerDependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
223
|
+
"typesPublisherContentHash": "1a2b14ecb35dbc8050f834cdd21087a8b6740cf2f9d098a9fbd700611966d6de",
|
|
224
224
|
"typeScriptVersion": "5.1"
|
|
225
225
|
}
|
node v18.19/stream.d.ts
CHANGED
|
@@ -729,6 +729,12 @@ declare module "stream" {
|
|
|
729
729
|
* @since v11.4.0
|
|
730
730
|
*/
|
|
731
731
|
readonly writable: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* Returns whether the stream was destroyed or errored before emitting `'finish'`.
|
|
734
|
+
* @since v18.0.0, v16.17.0
|
|
735
|
+
* @experimental
|
|
736
|
+
*/
|
|
737
|
+
readonly writableAborted: boolean;
|
|
732
738
|
/**
|
|
733
739
|
* Is `true` after `writable.end()` has been called. This property
|
|
734
740
|
* does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
|