@node-red/editor-client 3.0.2 → 3.1.0-beta.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.
Files changed (127) hide show
  1. package/locales/de/editor.json +2 -0
  2. package/locales/de/infotips.json +0 -0
  3. package/locales/de/jsonata.json +0 -0
  4. package/locales/en-US/editor.json +37 -6
  5. package/locales/en-US/infotips.json +0 -0
  6. package/locales/en-US/jsonata.json +0 -0
  7. package/locales/fr/editor.json +1238 -0
  8. package/locales/fr/infotips.json +23 -0
  9. package/locales/fr/jsonata.json +274 -0
  10. package/locales/ja/editor.json +48 -9
  11. package/locales/ko/editor.json +233 -31
  12. package/locales/ko/infotips.json +0 -0
  13. package/locales/ko/jsonata.json +0 -0
  14. package/locales/pt-BR/editor.json +1208 -0
  15. package/locales/pt-BR/infotips.json +23 -0
  16. package/locales/pt-BR/jsonata.json +274 -0
  17. package/locales/ru/editor.json +2 -0
  18. package/locales/ru/infotips.json +0 -0
  19. package/locales/ru/jsonata.json +0 -0
  20. package/locales/zh-CN/editor.json +1175 -1049
  21. package/locales/zh-TW/editor.json +3 -0
  22. package/package.json +1 -1
  23. package/public/red/about +140 -0
  24. package/public/red/red.js +2699 -1397
  25. package/public/red/red.min.js +4 -3
  26. package/public/red/style.min.css +1 -1
  27. package/public/red/tours/3.0/images/context-menu.png +0 -0
  28. package/public/red/tours/3.0/welcome.js +155 -0
  29. package/public/red/tours/images/context-menu.png +0 -0
  30. package/public/red/tours/images/global-env-vars.png +0 -0
  31. package/public/red/tours/images/hiding-flows.png +0 -0
  32. package/public/red/tours/images/locking-flows.png +0 -0
  33. package/public/red/tours/images/mermaid.png +0 -0
  34. package/public/red/tours/images/node-help.png +0 -0
  35. package/public/red/tours/images/tab-changes.png +0 -0
  36. package/public/red/tours/welcome.js +111 -94
  37. package/public/types/node/assert/strict.d.ts +11 -0
  38. package/public/types/node/assert.d.ts +898 -64
  39. package/public/types/node/async_hooks.d.ts +362 -94
  40. package/public/types/node/buffer.d.ts +2158 -14
  41. package/public/types/node/child_process.d.ts +1109 -257
  42. package/public/types/node/cluster.d.ts +349 -200
  43. package/public/types/node/console.d.ts +313 -43
  44. package/public/types/node/crypto.d.ts +3329 -656
  45. package/public/types/node/dgram.d.ts +459 -58
  46. package/public/types/node/diagnostics_channel.d.ts +155 -0
  47. package/public/types/node/dns/promises.d.ts +371 -0
  48. package/public/types/node/dns.d.ts +532 -265
  49. package/public/types/node/domain.d.ts +159 -16
  50. package/public/types/node/events.d.ts +589 -30
  51. package/public/types/node/fs/promises.d.ts +1097 -0
  52. package/public/types/node/fs.d.ts +2484 -958
  53. package/public/types/node/globals.d.ts +43 -503
  54. package/public/types/node/http.d.ts +1156 -145
  55. package/public/types/node/http2.d.ts +1610 -470
  56. package/public/types/node/https.d.ts +462 -72
  57. package/public/types/node/module.d.ts +72 -13
  58. package/public/types/node/net.d.ts +663 -131
  59. package/public/types/node/os.d.ts +238 -25
  60. package/public/types/node/path.d.ts +57 -23
  61. package/public/types/node/perf_hooks.d.ts +424 -112
  62. package/public/types/node/process.d.ts +1261 -193
  63. package/public/types/node/querystring.d.ts +107 -7
  64. package/public/types/node/readline.d.ts +443 -74
  65. package/public/types/node/stream/consumers.d.ts +15 -0
  66. package/public/types/node/stream/promises.d.ts +45 -0
  67. package/public/types/node/stream/web.d.ts +395 -0
  68. package/public/types/node/stream.d.ts +1081 -177
  69. package/public/types/node/string_decoder.d.ts +57 -0
  70. package/public/types/node/test.d.ts +193 -0
  71. package/public/types/node/timers/promises.d.ts +96 -0
  72. package/public/types/node/timers.d.ts +87 -12
  73. package/public/types/node/tls.d.ts +457 -222
  74. package/public/types/node/trace_events.d.ts +107 -10
  75. package/public/types/node/tty.d.ts +158 -23
  76. package/public/types/node/url.d.ts +734 -28
  77. package/public/types/node/util.d.ts +1542 -164
  78. package/public/types/node/v8.d.ts +261 -73
  79. package/public/types/node/vm.d.ts +384 -32
  80. package/public/types/node/wasi.d.ts +92 -23
  81. package/public/types/node/worker_threads.d.ts +531 -123
  82. package/public/types/node/zlib.d.ts +216 -63
  83. package/public/types/node-red/func.d.ts +3 -0
  84. package/public/vendor/jquery/css/base/images/ui-icons_444444_256x240.png +0 -0
  85. package/public/vendor/jquery/css/base/images/ui-icons_555555_256x240.png +0 -0
  86. package/public/vendor/jquery/css/base/images/ui-icons_777620_256x240.png +0 -0
  87. package/public/vendor/jquery/css/base/images/ui-icons_777777_256x240.png +0 -0
  88. package/public/vendor/jquery/css/base/images/ui-icons_cc0000_256x240.png +0 -0
  89. package/public/vendor/jquery/css/base/images/ui-icons_ffffff_256x240.png +0 -0
  90. package/public/vendor/jquery/css/base/jquery-ui.min.css +4 -4
  91. package/public/vendor/mermaid/mermaid.min.js +1284 -0
  92. package/public/vendor/monaco/dist/{ade705761eb7e702770d.ttf → 7064e66c3890a12c47b4.ttf} +0 -0
  93. package/public/vendor/monaco/dist/css.worker.js +1 -1
  94. package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
  95. package/public/vendor/monaco/dist/editor.js +1 -1
  96. package/public/vendor/monaco/dist/editor.js.LICENSE.txt +5 -1
  97. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  98. package/public/vendor/monaco/dist/html.worker.js +1 -1
  99. package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
  100. package/public/vendor/monaco/dist/json.worker.js +1 -1
  101. package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
  102. package/public/vendor/monaco/dist/locale/cs.js +319 -71
  103. package/public/vendor/monaco/dist/locale/de.js +323 -75
  104. package/public/vendor/monaco/dist/locale/es.js +318 -70
  105. package/public/vendor/monaco/dist/locale/fr.js +327 -79
  106. package/public/vendor/monaco/dist/locale/it.js +325 -77
  107. package/public/vendor/monaco/dist/locale/ja.js +337 -89
  108. package/public/vendor/monaco/dist/locale/ko.js +324 -76
  109. package/public/vendor/monaco/dist/locale/pl.js +322 -74
  110. package/public/vendor/monaco/dist/locale/pt-br.js +321 -73
  111. package/public/vendor/monaco/dist/locale/qps-ploc.js +1580 -1332
  112. package/public/vendor/monaco/dist/locale/ru.js +324 -76
  113. package/public/vendor/monaco/dist/locale/tr.js +326 -78
  114. package/public/vendor/monaco/dist/locale/zh-hans.js +328 -80
  115. package/public/vendor/monaco/dist/locale/zh-hant.js +321 -73
  116. package/public/vendor/monaco/dist/theme/forge.json +236 -0
  117. package/public/vendor/monaco/dist/theme/github-dark.json +348 -0
  118. package/public/vendor/monaco/dist/theme/github-light.json +348 -0
  119. package/public/vendor/monaco/dist/theme/nord.json +93 -0
  120. package/public/vendor/monaco/dist/ts.worker.js +1 -1
  121. package/public/vendor/monaco/dist/ts.worker.js.LICENSE.txt +14 -6
  122. package/public/vendor/vendor.js +9 -15
  123. /package/public/red/tours/{images → 3.0/images}/continuous-search.png +0 -0
  124. /package/public/red/tours/{images → 3.0/images}/debug-path-tooltip.png +0 -0
  125. /package/public/red/tours/{images → 3.0/images}/junction-quick-add.png +0 -0
  126. /package/public/red/tours/{images → 3.0/images}/junction-slice.gif +0 -0
  127. /package/public/red/tours/{images → 3.0/images}/split-wire-with-links.gif +0 -0
@@ -1,9 +1,16 @@
1
1
 
2
2
  /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
3
3
 
4
+ /**
5
+ * The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
6
+ *
7
+ * ```js
8
+ * const v8 = require('v8');
9
+ * ```
10
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js)
11
+ */
4
12
  declare module 'v8' {
5
- import { Readable } from 'stream';
6
-
13
+ import { Readable } from 'node:stream';
7
14
  interface HeapSpaceInfo {
8
15
  space_name: string;
9
16
  space_size: number;
@@ -11,10 +18,8 @@ declare module 'v8' {
11
18
  space_available_size: number;
12
19
  physical_space_size: number;
13
20
  }
14
-
15
21
  // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
16
22
  type DoesZapCodeSpaceFlag = 0 | 1;
17
-
18
23
  interface HeapInfo {
19
24
  total_heap_size: number;
20
25
  total_heap_size_executable: number;
@@ -28,165 +33,348 @@ declare module 'v8' {
28
33
  number_of_native_contexts: number;
29
34
  number_of_detached_contexts: number;
30
35
  }
31
-
32
36
  interface HeapCodeStatistics {
33
37
  code_and_metadata_size: number;
34
38
  bytecode_and_metadata_size: number;
35
39
  external_script_source_size: number;
36
40
  }
37
-
38
41
  /**
39
- * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
40
- * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
42
+ * Returns an integer representing a version tag derived from the V8 version,
43
+ * command-line flags, and detected CPU features. This is useful for determining
44
+ * whether a `vm.Script` `cachedData` buffer is compatible with this instance
45
+ * of V8.
46
+ *
47
+ * ```js
48
+ * console.log(v8.cachedDataVersionTag()); // 3947234607
49
+ * // The value returned by v8.cachedDataVersionTag() is derived from the V8
50
+ * // version, command-line flags, and detected CPU features. Test that the value
51
+ * // does indeed update when flags are toggled.
52
+ * v8.setFlagsFromString('--allow_natives_syntax');
53
+ * console.log(v8.cachedDataVersionTag()); // 183726201
54
+ * ```
55
+ * @since v8.0.0
41
56
  */
42
57
  function cachedDataVersionTag(): number;
43
-
58
+ /**
59
+ * Returns an object with the following properties:
60
+ *
61
+ * `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
62
+ * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
63
+ * because it continuously touches all heap pages and that makes them less likely
64
+ * to get swapped out by the operating system.
65
+ *
66
+ * `number_of_native_contexts` The value of native\_context is the number of the
67
+ * top-level contexts currently active. Increase of this number over time indicates
68
+ * a memory leak.
69
+ *
70
+ * `number_of_detached_contexts` The value of detached\_context is the number
71
+ * of contexts that were detached and not yet garbage collected. This number
72
+ * being non-zero indicates a potential memory leak.
73
+ *
74
+ * ```js
75
+ * {
76
+ * total_heap_size: 7326976,
77
+ * total_heap_size_executable: 4194304,
78
+ * total_physical_size: 7326976,
79
+ * total_available_size: 1152656,
80
+ * used_heap_size: 3476208,
81
+ * heap_size_limit: 1535115264,
82
+ * malloced_memory: 16384,
83
+ * peak_malloced_memory: 1127496,
84
+ * does_zap_garbage: 0,
85
+ * number_of_native_contexts: 1,
86
+ * number_of_detached_contexts: 0
87
+ * }
88
+ * ```
89
+ * @since v1.0.0
90
+ */
44
91
  function getHeapStatistics(): HeapInfo;
92
+ /**
93
+ * Returns statistics about the V8 heap spaces, i.e. the segments which make up
94
+ * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
95
+ * heap space can be guaranteed as the statistics are provided via the
96
+ * V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
97
+ * next.
98
+ *
99
+ * The value returned is an array of objects containing the following properties:
100
+ *
101
+ * ```json
102
+ * [
103
+ * {
104
+ * "space_name": "new_space",
105
+ * "space_size": 2063872,
106
+ * "space_used_size": 951112,
107
+ * "space_available_size": 80824,
108
+ * "physical_space_size": 2063872
109
+ * },
110
+ * {
111
+ * "space_name": "old_space",
112
+ * "space_size": 3090560,
113
+ * "space_used_size": 2493792,
114
+ * "space_available_size": 0,
115
+ * "physical_space_size": 3090560
116
+ * },
117
+ * {
118
+ * "space_name": "code_space",
119
+ * "space_size": 1260160,
120
+ * "space_used_size": 644256,
121
+ * "space_available_size": 960,
122
+ * "physical_space_size": 1260160
123
+ * },
124
+ * {
125
+ * "space_name": "map_space",
126
+ * "space_size": 1094160,
127
+ * "space_used_size": 201608,
128
+ * "space_available_size": 0,
129
+ * "physical_space_size": 1094160
130
+ * },
131
+ * {
132
+ * "space_name": "large_object_space",
133
+ * "space_size": 0,
134
+ * "space_used_size": 0,
135
+ * "space_available_size": 1490980608,
136
+ * "physical_space_size": 0
137
+ * }
138
+ * ]
139
+ * ```
140
+ * @since v6.0.0
141
+ */
45
142
  function getHeapSpaceStatistics(): HeapSpaceInfo[];
143
+ /**
144
+ * The `v8.setFlagsFromString()` method can be used to programmatically set
145
+ * V8 command-line flags. This method should be used with care. Changing settings
146
+ * after the VM has started may result in unpredictable behavior, including
147
+ * crashes and data loss; or it may simply do nothing.
148
+ *
149
+ * The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
150
+ *
151
+ * Usage:
152
+ *
153
+ * ```js
154
+ * // Print GC events to stdout for one minute.
155
+ * const v8 = require('v8');
156
+ * v8.setFlagsFromString('--trace_gc');
157
+ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
158
+ * ```
159
+ * @since v1.0.0
160
+ */
46
161
  function setFlagsFromString(flags: string): void;
47
162
  /**
48
163
  * Generates a snapshot of the current V8 heap and returns a Readable
49
164
  * Stream that may be used to read the JSON serialized representation.
50
- * This conversation was marked as resolved by joyeecheung
51
165
  * This JSON stream format is intended to be used with tools such as
52
166
  * Chrome DevTools. The JSON schema is undocumented and specific to the
53
- * V8 engine, and may change from one version of V8 to the next.
167
+ * V8 engine. Therefore, the schema may change from one version of V8 to the next.
168
+ *
169
+ * ```js
170
+ * // Print heap snapshot to the console
171
+ * const v8 = require('v8');
172
+ * const stream = v8.getHeapSnapshot();
173
+ * stream.pipe(process.stdout);
174
+ * ```
175
+ * @since v11.13.0
176
+ * @return A Readable Stream containing the V8 heap snapshot
54
177
  */
55
178
  function getHeapSnapshot(): Readable;
56
-
57
179
  /**
180
+ * Generates a snapshot of the current V8 heap and writes it to a JSON
181
+ * file. This file is intended to be used with tools such as Chrome
182
+ * DevTools. The JSON schema is undocumented and specific to the V8
183
+ * engine, and may change from one version of V8 to the next.
58
184
  *
59
- * @param fileName The file path where the V8 heap snapshot is to be
60
- * saved. If not specified, a file name with the pattern
61
- * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
62
- * generated, where `{pid}` will be the PID of the Node.js process,
63
- * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
64
- * the main Node.js thread or the id of a worker thread.
185
+ * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
186
+ * not contain any information about the workers, and vice versa.
187
+ *
188
+ * ```js
189
+ * const { writeHeapSnapshot } = require('v8');
190
+ * const {
191
+ * Worker,
192
+ * isMainThread,
193
+ * parentPort
194
+ * } = require('worker_threads');
195
+ *
196
+ * if (isMainThread) {
197
+ * const worker = new Worker(__filename);
198
+ *
199
+ * worker.once('message', (filename) => {
200
+ * console.log(`worker heapdump: ${filename}`);
201
+ * // Now get a heapdump for the main thread.
202
+ * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
203
+ * });
204
+ *
205
+ * // Tell the worker to create a heapdump.
206
+ * worker.postMessage('heapdump');
207
+ * } else {
208
+ * parentPort.once('message', (message) => {
209
+ * if (message === 'heapdump') {
210
+ * // Generate a heapdump for the worker
211
+ * // and return the filename to the parent.
212
+ * parentPort.postMessage(writeHeapSnapshot());
213
+ * }
214
+ * });
215
+ * }
216
+ * ```
217
+ * @since v11.13.0
218
+ * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
219
+ * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
220
+ * worker thread.
221
+ * @return The filename where the snapshot was saved.
222
+ */
223
+ function writeHeapSnapshot(filename?: string): string;
224
+ /**
225
+ * Returns an object with the following properties:
226
+ *
227
+ * ```js
228
+ * {
229
+ * code_and_metadata_size: 212208,
230
+ * bytecode_and_metadata_size: 161368,
231
+ * external_script_source_size: 1410794
232
+ * }
233
+ * ```
234
+ * @since v12.8.0
65
235
  */
66
- function writeHeapSnapshot(fileName?: string): string;
67
-
68
236
  function getHeapCodeStatistics(): HeapCodeStatistics;
69
-
237
+ /**
238
+ * @since v8.0.0
239
+ */
70
240
  class Serializer {
71
241
  /**
72
242
  * Writes out a header, which includes the serialization format version.
73
243
  */
74
244
  writeHeader(): void;
75
-
76
245
  /**
77
- * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
78
- * This throws an error if value cannot be serialized.
246
+ * Serializes a JavaScript value and adds the serialized representation to the
247
+ * internal buffer.
248
+ *
249
+ * This throws an error if `value` cannot be serialized.
79
250
  */
80
251
  writeValue(val: any): boolean;
81
-
82
252
  /**
83
- * Returns the stored internal buffer.
84
- * This serializer should not be used once the buffer is released.
85
- * Calling this method results in undefined behavior if a previous write has failed.
253
+ * Returns the stored internal buffer. This serializer should not be used once
254
+ * the buffer is released. Calling this method results in undefined behavior
255
+ * if a previous write has failed.
86
256
  */
87
257
  releaseBuffer(): Buffer;
88
-
89
258
  /**
90
- * Marks an ArrayBuffer as having its contents transferred out of band.\
91
- * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
259
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
260
+ * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
261
+ * @param id A 32-bit unsigned integer.
262
+ * @param arrayBuffer An `ArrayBuffer` instance.
92
263
  */
93
264
  transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
94
-
95
265
  /**
96
266
  * Write a raw 32-bit unsigned integer.
267
+ * For use inside of a custom `serializer._writeHostObject()`.
97
268
  */
98
269
  writeUint32(value: number): void;
99
-
100
270
  /**
101
271
  * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
272
+ * For use inside of a custom `serializer._writeHostObject()`.
102
273
  */
103
274
  writeUint64(hi: number, lo: number): void;
104
-
105
275
  /**
106
- * Write a JS number value.
276
+ * Write a JS `number` value.
277
+ * For use inside of a custom `serializer._writeHostObject()`.
107
278
  */
108
279
  writeDouble(value: number): void;
109
-
110
280
  /**
111
- * Write raw bytes into the serializer’s internal buffer.
112
- * The deserializer will require a way to compute the length of the buffer.
281
+ * Write raw bytes into the serializer’s internal buffer. The deserializer
282
+ * will require a way to compute the length of the buffer.
283
+ * For use inside of a custom `serializer._writeHostObject()`.
113
284
  */
114
285
  writeRawBytes(buffer: NodeJS.TypedArray): void;
115
286
  }
116
-
117
287
  /**
118
- * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
119
- * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
288
+ * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
289
+ * stores the part of their underlying `ArrayBuffer`s that they are referring to.
290
+ * @since v8.0.0
291
+ */
292
+ class DefaultSerializer extends Serializer {}
293
+ /**
294
+ * @since v8.0.0
120
295
  */
121
- class DefaultSerializer extends Serializer {
122
- }
123
-
124
296
  class Deserializer {
125
297
  constructor(data: NodeJS.TypedArray);
126
298
  /**
127
299
  * Reads and validates a header (including the format version).
128
- * May, for example, reject an invalid or unsupported wire format.
129
- * In that case, an Error is thrown.
300
+ * May, for example, reject an invalid or unsupported wire format. In that case,
301
+ * an `Error` is thrown.
130
302
  */
131
303
  readHeader(): boolean;
132
-
133
304
  /**
134
305
  * Deserializes a JavaScript value from the buffer and returns it.
135
306
  */
136
307
  readValue(): any;
137
-
138
308
  /**
139
- * Marks an ArrayBuffer as having its contents transferred out of band.
140
- * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
141
- * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
309
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
310
+ * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
311
+ * `SharedArrayBuffer`s).
312
+ * @param id A 32-bit unsigned integer.
313
+ * @param arrayBuffer An `ArrayBuffer` instance.
142
314
  */
143
315
  transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
144
-
145
316
  /**
146
- * Reads the underlying wire format version.
147
- * Likely mostly to be useful to legacy code reading old wire format versions.
148
- * May not be called before .readHeader().
317
+ * Reads the underlying wire format version. Likely mostly to be useful to
318
+ * legacy code reading old wire format versions. May not be called before`.readHeader()`.
149
319
  */
150
320
  getWireFormatVersion(): number;
151
-
152
321
  /**
153
322
  * Read a raw 32-bit unsigned integer and return it.
323
+ * For use inside of a custom `deserializer._readHostObject()`.
154
324
  */
155
325
  readUint32(): number;
156
-
157
326
  /**
158
- * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
327
+ * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
328
+ * For use inside of a custom `deserializer._readHostObject()`.
159
329
  */
160
330
  readUint64(): [number, number];
161
-
162
331
  /**
163
- * Read a JS number value.
332
+ * Read a JS `number` value.
333
+ * For use inside of a custom `deserializer._readHostObject()`.
164
334
  */
165
335
  readDouble(): number;
166
-
167
336
  /**
168
- * Read raw bytes from the deserializer’s internal buffer.
169
- * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
337
+ * Read raw bytes from the deserializer’s internal buffer. The `length` parameter
338
+ * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
339
+ * For use inside of a custom `deserializer._readHostObject()`.
170
340
  */
171
341
  readRawBytes(length: number): Buffer;
172
342
  }
173
-
174
343
  /**
175
- * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
176
- * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
344
+ * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
345
+ * @since v8.0.0
177
346
  */
178
- class DefaultDeserializer extends Deserializer {
179
- }
180
-
347
+ class DefaultDeserializer extends Deserializer {}
181
348
  /**
182
- * Uses a `DefaultSerializer` to serialize value into a buffer.
349
+ * Uses a `DefaultSerializer` to serialize `value` into a buffer.
350
+ * @since v8.0.0
183
351
  */
184
352
  function serialize(value: any): Buffer;
185
-
186
353
  /**
187
- * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
354
+ * Uses a `DefaultDeserializer` with default options to read a JS value
355
+ * from a buffer.
356
+ * @since v8.0.0
357
+ * @param buffer A buffer returned by {@link serialize}.
358
+ */
359
+ function deserialize(buffer: NodeJS.TypedArray): any;
360
+ /**
361
+ * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
362
+ * times during the lifetime of the process. Each time the execution counter will
363
+ * be reset and a new coverage report will be written to the directory specified
364
+ * by `NODE_V8_COVERAGE`.
365
+ *
366
+ * When the process is about to exit, one last coverage will still be written to
367
+ * disk unless {@link stopCoverage} is invoked before the process exits.
368
+ * @since v15.1.0, v12.22.0
369
+ */
370
+ function takeCoverage(): void;
371
+ /**
372
+ * The `v8.stopCoverage()` method allows the user to stop the coverage collection
373
+ * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
374
+ * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
375
+ * @since v15.1.0, v12.22.0
188
376
  */
189
- function deserialize(data: NodeJS.TypedArray): any;
377
+ function stopCoverage(): void;
190
378
  }
191
379
  declare module 'node:v8' {
192
380
  export * from 'v8';