@node-red/editor-client 3.1.8 → 4.0.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 (149) hide show
  1. package/locales/de/editor.json +2 -0
  2. package/locales/en-US/editor.json +10 -1
  3. package/locales/fr/editor.json +8 -1
  4. package/locales/ja/editor.json +10 -3
  5. package/package.json +1 -1
  6. package/public/red/about +52 -0
  7. package/public/red/red.js +1433 -263
  8. package/public/red/red.min.js +3 -3
  9. package/public/red/style.min.css +2 -2
  10. package/public/red/tours/3.1/welcome.js +231 -0
  11. package/public/red/tours/images/nr4-auto-complete.png +0 -0
  12. package/public/red/tours/images/nr4-config-select.png +0 -0
  13. package/public/red/tours/images/nr4-multiplayer.png +0 -0
  14. package/public/red/tours/images/nr4-plugins.png +0 -0
  15. package/public/red/tours/images/nr4-sf-config.png +0 -0
  16. package/public/red/tours/images/nr4-timestamp-formatting.png +0 -0
  17. package/public/red/tours/welcome.js +105 -161
  18. package/public/types/node/assert/strict.d.ts +1 -1
  19. package/public/types/node/assert.d.ts +8 -9
  20. package/public/types/node/async_hooks.d.ts +9 -5
  21. package/public/types/node/buffer.d.ts +43 -18
  22. package/public/types/node/child_process.d.ts +8 -5
  23. package/public/types/node/cluster.d.ts +15 -19
  24. package/public/types/node/console.d.ts +2 -2
  25. package/public/types/node/crypto.d.ts +165 -70
  26. package/public/types/node/dgram.d.ts +4 -4
  27. package/public/types/node/diagnostics_channel.d.ts +8 -7
  28. package/public/types/node/dns/promises.d.ts +11 -9
  29. package/public/types/node/dns.d.ts +18 -13
  30. package/public/types/node/dom-events.d.ts +129 -0
  31. package/public/types/node/domain.d.ts +2 -2
  32. package/public/types/node/events.d.ts +49 -12
  33. package/public/types/node/fs/promises.d.ts +68 -24
  34. package/public/types/node/fs.d.ts +132 -59
  35. package/public/types/node/globals.d.ts +31 -17
  36. package/public/types/node/http.d.ts +138 -27
  37. package/public/types/node/http2.d.ts +38 -5
  38. package/public/types/node/https.d.ts +12 -3
  39. package/public/types/node/module.d.ts +1 -2
  40. package/public/types/node/net.d.ts +69 -28
  41. package/public/types/node/os.d.ts +16 -5
  42. package/public/types/node/path.d.ts +5 -5
  43. package/public/types/node/perf_hooks.d.ts +48 -9
  44. package/public/types/node/process.d.ts +18 -17
  45. package/public/types/node/querystring.d.ts +2 -2
  46. package/public/types/node/readline/promises.d.ts +146 -0
  47. package/public/types/node/readline.d.ts +141 -31
  48. package/public/types/node/stream/consumers.d.ts +2 -2
  49. package/public/types/node/stream/promises.d.ts +1 -1
  50. package/public/types/node/stream/web.d.ts +4 -66
  51. package/public/types/node/stream.d.ts +96 -118
  52. package/public/types/node/string_decoder.d.ts +2 -2
  53. package/public/types/node/test.d.ts +200 -16
  54. package/public/types/node/timers/promises.d.ts +1 -26
  55. package/public/types/node/timers.d.ts +2 -2
  56. package/public/types/node/tls.d.ts +21 -12
  57. package/public/types/node/trace_events.d.ts +12 -2
  58. package/public/types/node/ts4.8/assert/strict.d.ts +11 -0
  59. package/public/types/node/ts4.8/assert.d.ts +964 -0
  60. package/public/types/node/ts4.8/async_hooks.d.ts +504 -0
  61. package/public/types/node/ts4.8/buffer.d.ts +2262 -0
  62. package/public/types/node/ts4.8/child_process.d.ts +1372 -0
  63. package/public/types/node/ts4.8/cluster.d.ts +413 -0
  64. package/public/types/node/ts4.8/console.d.ts +415 -0
  65. package/public/types/node/ts4.8/crypto.d.ts +3967 -0
  66. package/public/types/node/ts4.8/dgram.d.ts +548 -0
  67. package/public/types/node/ts4.8/diagnostics_channel.d.ts +156 -0
  68. package/public/types/node/ts4.8/dns/promises.d.ts +373 -0
  69. package/public/types/node/ts4.8/dns.d.ts +662 -0
  70. package/public/types/node/ts4.8/dom-events.d.ts +129 -0
  71. package/public/types/node/ts4.8/domain.d.ts +173 -0
  72. package/public/types/node/ts4.8/events.d.ts +681 -0
  73. package/public/types/node/ts4.8/fs/promises.d.ts +1141 -0
  74. package/public/types/node/ts4.8/fs.d.ts +3875 -0
  75. package/public/types/node/ts4.8/globals.d.ts +297 -0
  76. package/public/types/node/ts4.8/http.d.ts +1617 -0
  77. package/public/types/node/ts4.8/http2.d.ts +2137 -0
  78. package/public/types/node/ts4.8/https.d.ts +544 -0
  79. package/public/types/node/ts4.8/module.d.ts +117 -0
  80. package/public/types/node/ts4.8/net.d.ts +872 -0
  81. package/public/types/node/ts4.8/os.d.ts +469 -0
  82. package/public/types/node/ts4.8/path.d.ts +194 -0
  83. package/public/types/node/ts4.8/perf_hooks.d.ts +628 -0
  84. package/public/types/node/ts4.8/process.d.ts +1485 -0
  85. package/public/types/node/ts4.8/querystring.d.ts +134 -0
  86. package/public/types/node/ts4.8/readline/promises.d.ts +146 -0
  87. package/public/types/node/ts4.8/readline.d.ts +656 -0
  88. package/public/types/node/ts4.8/stream/consumers.d.ts +15 -0
  89. package/public/types/node/ts4.8/stream/promises.d.ts +45 -0
  90. package/public/types/node/ts4.8/stream/web.d.ts +333 -0
  91. package/public/types/node/ts4.8/stream.d.ts +1343 -0
  92. package/public/types/node/ts4.8/string_decoder.d.ts +70 -0
  93. package/public/types/node/ts4.8/test.d.ts +377 -0
  94. package/public/types/node/ts4.8/timers/promises.d.ts +71 -0
  95. package/public/types/node/ts4.8/timers.d.ts +97 -0
  96. package/public/types/node/ts4.8/tls.d.ts +1031 -0
  97. package/public/types/node/ts4.8/trace_events.d.ts +174 -0
  98. package/public/types/node/ts4.8/tty.d.ts +209 -0
  99. package/public/types/node/ts4.8/url.d.ts +900 -0
  100. package/public/types/node/ts4.8/util.d.ts +1853 -0
  101. package/public/types/node/ts4.8/v8.d.ts +399 -0
  102. package/public/types/node/ts4.8/vm.d.ts +512 -0
  103. package/public/types/node/ts4.8/wasi.d.ts +161 -0
  104. package/public/types/node/ts4.8/worker_threads.d.ts +692 -0
  105. package/public/types/node/ts4.8/zlib.d.ts +520 -0
  106. package/public/types/node/tty.d.ts +5 -3
  107. package/public/types/node/url.d.ts +81 -39
  108. package/public/types/node/util.d.ts +269 -13
  109. package/public/types/node/v8.d.ts +22 -4
  110. package/public/types/node/vm.d.ts +7 -5
  111. package/public/types/node/wasi.d.ts +2 -2
  112. package/public/types/node/worker_threads.d.ts +51 -11
  113. package/public/types/node/zlib.d.ts +2 -2
  114. package/public/types/node-red/func.d.ts +26 -17
  115. package/public/vendor/ace/worker-jsonata.js +1 -1
  116. package/public/vendor/monaco/dist/{fa2cc0ab9f0bec2b3365.ttf → 0c718f5b7d2bce997c5f.ttf} +0 -0
  117. package/public/vendor/monaco/dist/css.worker.js +1 -1
  118. package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
  119. package/public/vendor/monaco/dist/editor.js +1 -29
  120. package/public/vendor/monaco/dist/editor.js.LICENSE.txt +2 -2
  121. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  122. package/public/vendor/monaco/dist/html.worker.js +1 -1
  123. package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
  124. package/public/vendor/monaco/dist/json.worker.js +1 -1
  125. package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
  126. package/public/vendor/monaco/dist/locale/cs.js +324 -106
  127. package/public/vendor/monaco/dist/locale/de.js +336 -118
  128. package/public/vendor/monaco/dist/locale/es.js +329 -111
  129. package/public/vendor/monaco/dist/locale/fr.js +334 -116
  130. package/public/vendor/monaco/dist/locale/it.js +327 -109
  131. package/public/vendor/monaco/dist/locale/ja.js +329 -111
  132. package/public/vendor/monaco/dist/locale/ko.js +330 -112
  133. package/public/vendor/monaco/dist/locale/pl.js +329 -111
  134. package/public/vendor/monaco/dist/locale/pt-br.js +329 -111
  135. package/public/vendor/monaco/dist/locale/qps-ploc.js +330 -112
  136. package/public/vendor/monaco/dist/locale/ru.js +331 -113
  137. package/public/vendor/monaco/dist/locale/tr.js +329 -111
  138. package/public/vendor/monaco/dist/locale/zh-hans.js +331 -113
  139. package/public/vendor/monaco/dist/locale/zh-hant.js +331 -113
  140. package/public/vendor/monaco/dist/ts.worker.js +2 -2
  141. package/public/vendor/vendor.js +1 -1
  142. package/public/vendor/monaco/dist/7064e66c3890a12c47b4.ttf +0 -0
  143. /package/public/red/tours/{images → 3.1/images}/context-menu.png +0 -0
  144. /package/public/red/tours/{images → 3.1/images}/global-env-vars.png +0 -0
  145. /package/public/red/tours/{images → 3.1/images}/hiding-flows.png +0 -0
  146. /package/public/red/tours/{images → 3.1/images}/locking-flows.png +0 -0
  147. /package/public/red/tours/{images → 3.1/images}/mermaid.png +0 -0
  148. /package/public/red/tours/{images → 3.1/images}/node-help.png +0 -0
  149. /package/public/red/tours/{images → 3.1/images}/tab-changes.png +0 -0
@@ -0,0 +1,399 @@
1
+
2
+ /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/node-red/nr-monaco-build */
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/v18.0.0/lib/v8.js)
11
+ */
12
+ declare module 'v8' {
13
+ import { Readable } from 'node:stream';
14
+ interface HeapSpaceInfo {
15
+ space_name: string;
16
+ space_size: number;
17
+ space_used_size: number;
18
+ space_available_size: number;
19
+ physical_space_size: number;
20
+ }
21
+ // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
22
+ type DoesZapCodeSpaceFlag = 0 | 1;
23
+ interface HeapInfo {
24
+ total_heap_size: number;
25
+ total_heap_size_executable: number;
26
+ total_physical_size: number;
27
+ total_available_size: number;
28
+ used_heap_size: number;
29
+ heap_size_limit: number;
30
+ malloced_memory: number;
31
+ peak_malloced_memory: number;
32
+ does_zap_garbage: DoesZapCodeSpaceFlag;
33
+ number_of_native_contexts: number;
34
+ number_of_detached_contexts: number;
35
+ }
36
+ interface HeapCodeStatistics {
37
+ code_and_metadata_size: number;
38
+ bytecode_and_metadata_size: number;
39
+ external_script_source_size: number;
40
+ }
41
+ /**
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
56
+ */
57
+ function cachedDataVersionTag(): number;
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
+ */
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
+ */
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
+ */
161
+ function setFlagsFromString(flags: string): void;
162
+ /**
163
+ * Generates a snapshot of the current V8 heap and returns a Readable
164
+ * Stream that may be used to read the JSON serialized representation.
165
+ * This JSON stream format is intended to be used with tools such as
166
+ * Chrome DevTools. The JSON schema is undocumented and specific to the
167
+ * V8 engine. Therefore, the schema may change from one version of V8 to the next.
168
+ *
169
+ * Creating a heap snapshot requires memory about twice the size of the heap at
170
+ * the time the snapshot is created. This results in the risk of OOM killers
171
+ * terminating the process.
172
+ *
173
+ * Generating a snapshot is a synchronous operation which blocks the event loop
174
+ * for a duration depending on the heap size.
175
+ *
176
+ * ```js
177
+ * // Print heap snapshot to the console
178
+ * const v8 = require('v8');
179
+ * const stream = v8.getHeapSnapshot();
180
+ * stream.pipe(process.stdout);
181
+ * ```
182
+ * @since v11.13.0
183
+ * @return A Readable Stream containing the V8 heap snapshot
184
+ */
185
+ function getHeapSnapshot(): Readable;
186
+ /**
187
+ * Generates a snapshot of the current V8 heap and writes it to a JSON
188
+ * file. This file is intended to be used with tools such as Chrome
189
+ * DevTools. The JSON schema is undocumented and specific to the V8
190
+ * engine, and may change from one version of V8 to the next.
191
+ *
192
+ * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
193
+ * not contain any information about the workers, and vice versa.
194
+ *
195
+ * Creating a heap snapshot requires memory about twice the size of the heap at
196
+ * the time the snapshot is created. This results in the risk of OOM killers
197
+ * terminating the process.
198
+ *
199
+ * Generating a snapshot is a synchronous operation which blocks the event loop
200
+ * for a duration depending on the heap size.
201
+ *
202
+ * ```js
203
+ * const { writeHeapSnapshot } = require('v8');
204
+ * const {
205
+ * Worker,
206
+ * isMainThread,
207
+ * parentPort
208
+ * } = require('worker_threads');
209
+ *
210
+ * if (isMainThread) {
211
+ * const worker = new Worker(__filename);
212
+ *
213
+ * worker.once('message', (filename) => {
214
+ * console.log(`worker heapdump: ${filename}`);
215
+ * // Now get a heapdump for the main thread.
216
+ * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
217
+ * });
218
+ *
219
+ * // Tell the worker to create a heapdump.
220
+ * worker.postMessage('heapdump');
221
+ * } else {
222
+ * parentPort.once('message', (message) => {
223
+ * if (message === 'heapdump') {
224
+ * // Generate a heapdump for the worker
225
+ * // and return the filename to the parent.
226
+ * parentPort.postMessage(writeHeapSnapshot());
227
+ * }
228
+ * });
229
+ * }
230
+ * ```
231
+ * @since v11.13.0
232
+ * @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
233
+ * 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
234
+ * worker thread.
235
+ * @return The filename where the snapshot was saved.
236
+ */
237
+ function writeHeapSnapshot(filename?: string): string;
238
+ /**
239
+ * Returns an object with the following properties:
240
+ *
241
+ * ```js
242
+ * {
243
+ * code_and_metadata_size: 212208,
244
+ * bytecode_and_metadata_size: 161368,
245
+ * external_script_source_size: 1410794
246
+ * }
247
+ * ```
248
+ * @since v12.8.0
249
+ */
250
+ function getHeapCodeStatistics(): HeapCodeStatistics;
251
+ /**
252
+ * @since v8.0.0
253
+ */
254
+ class Serializer {
255
+ /**
256
+ * Writes out a header, which includes the serialization format version.
257
+ */
258
+ writeHeader(): void;
259
+ /**
260
+ * Serializes a JavaScript value and adds the serialized representation to the
261
+ * internal buffer.
262
+ *
263
+ * This throws an error if `value` cannot be serialized.
264
+ */
265
+ writeValue(val: any): boolean;
266
+ /**
267
+ * Returns the stored internal buffer. This serializer should not be used once
268
+ * the buffer is released. Calling this method results in undefined behavior
269
+ * if a previous write has failed.
270
+ */
271
+ releaseBuffer(): Buffer;
272
+ /**
273
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
274
+ * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
275
+ * @param id A 32-bit unsigned integer.
276
+ * @param arrayBuffer An `ArrayBuffer` instance.
277
+ */
278
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
279
+ /**
280
+ * Write a raw 32-bit unsigned integer.
281
+ * For use inside of a custom `serializer._writeHostObject()`.
282
+ */
283
+ writeUint32(value: number): void;
284
+ /**
285
+ * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
286
+ * For use inside of a custom `serializer._writeHostObject()`.
287
+ */
288
+ writeUint64(hi: number, lo: number): void;
289
+ /**
290
+ * Write a JS `number` value.
291
+ * For use inside of a custom `serializer._writeHostObject()`.
292
+ */
293
+ writeDouble(value: number): void;
294
+ /**
295
+ * Write raw bytes into the serializer’s internal buffer. The deserializer
296
+ * will require a way to compute the length of the buffer.
297
+ * For use inside of a custom `serializer._writeHostObject()`.
298
+ */
299
+ writeRawBytes(buffer: NodeJS.TypedArray): void;
300
+ }
301
+ /**
302
+ * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
303
+ * stores the part of their underlying `ArrayBuffer`s that they are referring to.
304
+ * @since v8.0.0
305
+ */
306
+ class DefaultSerializer extends Serializer {}
307
+ /**
308
+ * @since v8.0.0
309
+ */
310
+ class Deserializer {
311
+ constructor(data: NodeJS.TypedArray);
312
+ /**
313
+ * Reads and validates a header (including the format version).
314
+ * May, for example, reject an invalid or unsupported wire format. In that case,
315
+ * an `Error` is thrown.
316
+ */
317
+ readHeader(): boolean;
318
+ /**
319
+ * Deserializes a JavaScript value from the buffer and returns it.
320
+ */
321
+ readValue(): any;
322
+ /**
323
+ * Marks an `ArrayBuffer` as having its contents transferred out of band.
324
+ * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
325
+ * `SharedArrayBuffer`s).
326
+ * @param id A 32-bit unsigned integer.
327
+ * @param arrayBuffer An `ArrayBuffer` instance.
328
+ */
329
+ transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
330
+ /**
331
+ * Reads the underlying wire format version. Likely mostly to be useful to
332
+ * legacy code reading old wire format versions. May not be called before`.readHeader()`.
333
+ */
334
+ getWireFormatVersion(): number;
335
+ /**
336
+ * Read a raw 32-bit unsigned integer and return it.
337
+ * For use inside of a custom `deserializer._readHostObject()`.
338
+ */
339
+ readUint32(): number;
340
+ /**
341
+ * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
342
+ * For use inside of a custom `deserializer._readHostObject()`.
343
+ */
344
+ readUint64(): [number, number];
345
+ /**
346
+ * Read a JS `number` value.
347
+ * For use inside of a custom `deserializer._readHostObject()`.
348
+ */
349
+ readDouble(): number;
350
+ /**
351
+ * Read raw bytes from the deserializer’s internal buffer. The `length` parameter
352
+ * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
353
+ * For use inside of a custom `deserializer._readHostObject()`.
354
+ */
355
+ readRawBytes(length: number): Buffer;
356
+ }
357
+ /**
358
+ * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
359
+ * @since v8.0.0
360
+ */
361
+ class DefaultDeserializer extends Deserializer {}
362
+ /**
363
+ * Uses a `DefaultSerializer` to serialize `value` into a buffer.
364
+ *
365
+ * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
366
+ * serialize a huge object which requires buffer
367
+ * larger than `buffer.constants.MAX_LENGTH`.
368
+ * @since v8.0.0
369
+ */
370
+ function serialize(value: any): Buffer;
371
+ /**
372
+ * Uses a `DefaultDeserializer` with default options to read a JS value
373
+ * from a buffer.
374
+ * @since v8.0.0
375
+ * @param buffer A buffer returned by {@link serialize}.
376
+ */
377
+ function deserialize(buffer: NodeJS.TypedArray): any;
378
+ /**
379
+ * 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
380
+ * times during the lifetime of the process. Each time the execution counter will
381
+ * be reset and a new coverage report will be written to the directory specified
382
+ * by `NODE_V8_COVERAGE`.
383
+ *
384
+ * When the process is about to exit, one last coverage will still be written to
385
+ * disk unless {@link stopCoverage} is invoked before the process exits.
386
+ * @since v15.1.0, v14.18.0, v12.22.0
387
+ */
388
+ function takeCoverage(): void;
389
+ /**
390
+ * The `v8.stopCoverage()` method allows the user to stop the coverage collection
391
+ * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
392
+ * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
393
+ * @since v15.1.0, v14.18.0, v12.22.0
394
+ */
395
+ function stopCoverage(): void;
396
+ }
397
+ declare module 'node:v8' {
398
+ export * from 'v8';
399
+ }