@types/node 16.18.18 → 16.18.20

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 v16.18/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 20 Mar 2023 21:32:46 GMT
11
+ * Last updated: Fri, 24 Mar 2023 23:02:40 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
@@ -20,7 +20,7 @@
20
20
  * should generally include the module name to avoid collisions with data from
21
21
  * other modules.
22
22
  * @experimental
23
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/diagnostics_channel.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v16.19.1/lib/diagnostics_channel.js)
24
24
  */
25
25
  declare module 'diagnostics_channel' {
26
26
  /**
@@ -58,6 +58,45 @@ declare module 'diagnostics_channel' {
58
58
  */
59
59
  function channel(name: string | symbol): Channel;
60
60
  type ChannelListener = (message: unknown, name: string | symbol) => void;
61
+ /**
62
+ * Register a message handler to subscribe to this channel. This message handler will be run synchronously
63
+ * whenever a message is published to the channel. Any errors thrown in the message handler will
64
+ * trigger an 'uncaughtException'.
65
+ *
66
+ * ```js
67
+ * import diagnostics_channel from 'diagnostics_channel';
68
+ *
69
+ * diagnostics_channel.subscribe('my-channel', (message, name) => {
70
+ * // Received data
71
+ * });
72
+ * ```
73
+ *
74
+ * @since v18.7.0, v16.17.0
75
+ * @param name The channel name
76
+ * @param onMessage The handler to receive channel messages
77
+ */
78
+ function subscribe(name: string | symbol, onMessage: ChannelListener): void;
79
+ /**
80
+ * Remove a message handler previously registered to this channel with diagnostics_channel.subscribe(name, onMessage).
81
+ *
82
+ * ```js
83
+ * import diagnostics_channel from 'diagnostics_channel';
84
+ *
85
+ * function onMessage(message, name) {
86
+ * // Received data
87
+ * }
88
+ *
89
+ * diagnostics_channel.subscribe('my-channel', onMessage);
90
+ *
91
+ * diagnostics_channel.unsubscribe('my-channel', onMessage);
92
+ * ```
93
+ *
94
+ * @since v18.7.0, v16.17.0
95
+ * @param name The channel name
96
+ * @param onMessage The previous subscribed handler to remove
97
+ * @returns `true` if the handler was found, `false` otherwise
98
+ */
99
+ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
61
100
  /**
62
101
  * The class `Channel` represents an individual named channel within the data
63
102
  * pipeline. It is use to track subscribers and to publish messages when there
node v16.18/dns.d.ts CHANGED
@@ -171,7 +171,7 @@ declare module 'dns' {
171
171
  type: 'AAAA';
172
172
  }
173
173
  export interface CaaRecord {
174
- critial: number;
174
+ critical: number;
175
175
  issue?: string | undefined;
176
176
  issuewild?: string | undefined;
177
177
  iodef?: string | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.18.18",
3
+ "version": "16.18.20",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -227,6 +227,6 @@
227
227
  },
228
228
  "scripts": {},
229
229
  "dependencies": {},
230
- "typesPublisherContentHash": "39606399a9fc4fd71c4fc9a11acadf9726a7643d9c47f3b60bf01f4f443a6e6f",
230
+ "typesPublisherContentHash": "d875d5edc433c2968b4a94d19e8c48eb8bcda4a1ed6bad788f7f71e09ca157ad",
231
231
  "typeScriptVersion": "4.3"
232
232
  }
@@ -20,7 +20,7 @@
20
20
  * should generally include the module name to avoid collisions with data from
21
21
  * other modules.
22
22
  * @experimental
23
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/diagnostics_channel.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v16.19.1/lib/diagnostics_channel.js)
24
24
  */
25
25
  declare module 'diagnostics_channel' {
26
26
  /**
@@ -57,6 +57,45 @@ declare module 'diagnostics_channel' {
57
57
  * @return The named channel object
58
58
  */
59
59
  function channel(name: string | symbol): Channel;
60
+ /**
61
+ * Register a message handler to subscribe to this channel. This message handler will be run synchronously
62
+ * whenever a message is published to the channel. Any errors thrown in the message handler will
63
+ * trigger an 'uncaughtException'.
64
+ *
65
+ * ```js
66
+ * import diagnostics_channel from 'diagnostics_channel';
67
+ *
68
+ * diagnostics_channel.subscribe('my-channel', (message, name) => {
69
+ * // Received data
70
+ * });
71
+ * ```
72
+ *
73
+ * @since v18.7.0, v16.17.0
74
+ * @param name The channel name
75
+ * @param onMessage The handler to receive channel messages
76
+ */
77
+ function subscribe(name: string | symbol, onMessage: ChannelListener): void;
78
+ /**
79
+ * Remove a message handler previously registered to this channel with diagnostics_channel.subscribe(name, onMessage).
80
+ *
81
+ * ```js
82
+ * import diagnostics_channel from 'diagnostics_channel';
83
+ *
84
+ * function onMessage(message, name) {
85
+ * // Received data
86
+ * }
87
+ *
88
+ * diagnostics_channel.subscribe('my-channel', onMessage);
89
+ *
90
+ * diagnostics_channel.unsubscribe('my-channel', onMessage);
91
+ * ```
92
+ *
93
+ * @since v18.7.0, v16.17.0
94
+ * @param name The channel name
95
+ * @param onMessage The previous subscribed handler to remove
96
+ * @returns `true` if the handler was found, `false` otherwise
97
+ */
98
+ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
60
99
  type ChannelListener = (message: unknown, name: string | symbol) => void;
61
100
  /**
62
101
  * The class `Channel` represents an individual named channel within the data
@@ -171,7 +171,7 @@ declare module 'dns' {
171
171
  type: 'AAAA';
172
172
  }
173
173
  export interface CaaRecord {
174
- critial: number;
174
+ critical: number;
175
175
  issue?: string | undefined;
176
176
  issuewild?: string | undefined;
177
177
  iodef?: string | undefined;