@types/node 26.0.0 → 26.0.1
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 +1 -1
- node/diagnostics_channel.d.ts +17 -20
- node/package.json +2 -2
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:
|
|
11
|
+
* Last updated: Wed, 24 Jun 2026 20:32:59 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node/diagnostics_channel.d.ts
CHANGED
|
@@ -33,7 +33,10 @@ declare module "node:diagnostics_channel" {
|
|
|
33
33
|
* @param name The channel name
|
|
34
34
|
* @return The named channel object
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
|
|
37
|
+
function channel<ContextType = any, StoreType = ContextType>(
|
|
38
|
+
name: string | symbol,
|
|
39
|
+
): Channel<ContextType, StoreType>;
|
|
37
40
|
type ChannelListener = (message: unknown, name: string | symbol) => void;
|
|
38
41
|
/**
|
|
39
42
|
* Register a message handler to subscribe to this channel. This message handler
|
|
@@ -96,12 +99,9 @@ declare module "node:diagnostics_channel" {
|
|
|
96
99
|
* @param nameOrChannels Channel name or object containing all the `TracingChannel Channels`
|
|
97
100
|
* @return Collection of channels to trace with
|
|
98
101
|
*/
|
|
99
|
-
function tracingChannel<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
>(
|
|
103
|
-
nameOrChannels: string | TracingChannelCollection<StoreType, ContextType>,
|
|
104
|
-
): TracingChannel<StoreType, ContextType>;
|
|
102
|
+
function tracingChannel<ContextType extends object = object, StoreType = ContextType>(
|
|
103
|
+
nameOrChannels: string | TracingChannelCollection<ContextType, StoreType>,
|
|
104
|
+
): TracingChannel<ContextType, StoreType>;
|
|
105
105
|
/**
|
|
106
106
|
* The class `Channel` represents an individual named channel within the data
|
|
107
107
|
* pipeline. It is used to track subscribers and to publish messages when there
|
|
@@ -111,7 +111,7 @@ declare module "node:diagnostics_channel" {
|
|
|
111
111
|
* with `new Channel(name)` is not supported.
|
|
112
112
|
* @since v15.1.0, v14.17.0
|
|
113
113
|
*/
|
|
114
|
-
class Channel<
|
|
114
|
+
class Channel<ContextType = any, StoreType = ContextType> {
|
|
115
115
|
readonly name: string | symbol;
|
|
116
116
|
/**
|
|
117
117
|
* Check if there are active subscribers to this channel. This is helpful if
|
|
@@ -304,12 +304,12 @@ declare module "node:diagnostics_channel" {
|
|
|
304
304
|
},
|
|
305
305
|
) => void;
|
|
306
306
|
}
|
|
307
|
-
interface TracingChannelCollection<
|
|
308
|
-
start: Channel<
|
|
309
|
-
end: Channel<
|
|
310
|
-
asyncStart: Channel<
|
|
311
|
-
asyncEnd: Channel<
|
|
312
|
-
error: Channel<
|
|
307
|
+
interface TracingChannelCollection<ContextType extends object = object, StoreType = ContextType> {
|
|
308
|
+
start: Channel<ContextType, StoreType>;
|
|
309
|
+
end: Channel<ContextType, StoreType>;
|
|
310
|
+
asyncStart: Channel<ContextType, StoreType>;
|
|
311
|
+
asyncEnd: Channel<ContextType, StoreType>;
|
|
312
|
+
error: Channel<ContextType, StoreType>;
|
|
313
313
|
}
|
|
314
314
|
/**
|
|
315
315
|
* The class `TracingChannel` is a collection of `TracingChannel Channels` which
|
|
@@ -320,12 +320,9 @@ declare module "node:diagnostics_channel" {
|
|
|
320
320
|
* @since v19.9.0
|
|
321
321
|
* @experimental
|
|
322
322
|
*/
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
asyncStart: Channel<StoreType, ContextType>;
|
|
327
|
-
asyncEnd: Channel<StoreType, ContextType>;
|
|
328
|
-
error: Channel<StoreType, ContextType>;
|
|
323
|
+
interface TracingChannel<ContextType extends object = object, StoreType = ContextType>
|
|
324
|
+
extends TracingChannelCollection<ContextType, StoreType>
|
|
325
|
+
{
|
|
329
326
|
/**
|
|
330
327
|
* Helper to subscribe a collection of functions to the corresponding channels.
|
|
331
328
|
* This is the same as calling `channel.subscribe(onMessage)` on each channel
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~8.3.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "a354aaa75dcea5eab474337cc3c7f8ab35ebed8c28d8cdb987dc31049b0fc0c6",
|
|
154
154
|
"typeScriptVersion": "5.6"
|
|
155
155
|
}
|