@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
@@ -16,23 +16,6 @@ interface ErrorConstructor {
16
16
  stackTraceLimit: number;
17
17
  }
18
18
 
19
- // Node.js ESNEXT support
20
- interface String {
21
- /** Removes whitespace from the left end of a string. */
22
- trimLeft(): string;
23
- /** Removes whitespace from the right end of a string. */
24
- trimRight(): string;
25
-
26
- /** Returns a copy with leading whitespace removed. */
27
- trimStart(): string;
28
- /** Returns a copy with trailing whitespace removed. */
29
- trimEnd(): string;
30
- }
31
-
32
- interface ImportMeta {
33
- url: string;
34
- }
35
-
36
19
  /*-----------------------------------------------*
37
20
  * *
38
21
  * GLOBAL *
@@ -40,9 +23,9 @@ interface ImportMeta {
40
23
  ------------------------------------------------*/
41
24
 
42
25
  // For backwards compability
43
- interface NodeRequire extends NodeJS.Require {}
44
- interface RequireResolve extends NodeJS.RequireResolve {}
45
- interface NodeModule extends NodeJS.Module {}
26
+ interface NodeRequire extends NodeJS.Require { }
27
+ interface RequireResolve extends NodeJS.RequireResolve { }
28
+ interface NodeModule extends NodeJS.Module { }
46
29
 
47
30
  declare var process: NodeJS.Process;
48
31
  declare var console: Console;
@@ -50,61 +33,36 @@ declare var console: Console;
50
33
  declare var __filename: string;
51
34
  declare var __dirname: string;
52
35
 
53
- declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
54
- declare namespace setTimeout {
55
- function __promisify__(ms: number): Promise<void>;
56
- function __promisify__<T>(ms: number, value: T): Promise<T>;
57
- }
58
- declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
59
- declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
60
- declare function clearInterval(intervalId: NodeJS.Timeout): void;
61
- declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
62
- declare namespace setImmediate {
63
- function __promisify__(): Promise<void>;
64
- function __promisify__<T>(value: T): Promise<T>;
65
- }
66
- declare function clearImmediate(immediateId: NodeJS.Immediate): void;
67
-
68
- declare function queueMicrotask(callback: () => void): void;
69
-
70
36
  declare var require: NodeRequire;
71
37
  declare var module: NodeModule;
72
38
 
73
39
  // Same as module.exports
74
40
  declare var exports: any;
75
41
 
76
- // Buffer class
77
- type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
78
-
79
- type WithImplicitCoercion<T> = T | { valueOf(): T };
42
+ /**
43
+ * Only available if `--expose-gc` is passed to the process.
44
+ */
45
+ declare var gc: undefined | (() => void);
80
46
 
81
47
  //#region borrowed
82
48
  // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
83
- /**
84
- * A controller object that allows you to abort one or more DOM requests as and when desired.
85
- * @since v14.7.0
86
- */
49
+ /** A controller object that allows you to abort one or more DOM requests as and when desired. */
87
50
  interface AbortController {
88
51
  /**
89
52
  * Returns the AbortSignal object associated with this object.
90
- * @since v14.7.0
91
53
  */
54
+
92
55
  readonly signal: AbortSignal;
93
56
  /**
94
57
  * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
95
- * @since v14.7.0
96
58
  */
97
59
  abort(): void;
98
60
  }
99
61
 
100
- /**
101
- * A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
102
- * @since v14.7.0
103
- */
62
+ /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
104
63
  interface AbortSignal {
105
64
  /**
106
65
  * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
107
- * @since v14.7.0
108
66
  */
109
67
  readonly aborted: boolean;
110
68
  }
@@ -117,335 +75,35 @@ declare var AbortController: {
117
75
  declare var AbortSignal: {
118
76
  prototype: AbortSignal;
119
77
  new(): AbortSignal;
120
- // TODO: Add abort() static
78
+ abort(reason?: any): AbortSignal;
79
+ timeout(milliseconds: number): AbortSignal;
121
80
  };
122
81
  //#endregion borrowed
123
82
 
124
- /**
125
- * Raw data is stored in instances of the Buffer class.
126
- * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
127
- * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
128
- */
129
- declare class Buffer extends Uint8Array {
130
- /**
131
- * Allocates a new buffer containing the given {str}.
132
- *
133
- * @param str String to store in buffer.
134
- * @param encoding encoding to use, optional. Default is 'utf8'
135
- * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
136
- */
137
- constructor(str: string, encoding?: BufferEncoding);
138
- /**
139
- * Allocates a new buffer of {size} octets.
140
- *
141
- * @param size count of octets to allocate.
142
- * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
143
- */
144
- constructor(size: number);
145
- /**
146
- * Allocates a new buffer containing the given {array} of octets.
147
- *
148
- * @param array The octets to store.
149
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
150
- */
151
- constructor(array: Uint8Array);
152
- /**
153
- * Produces a Buffer backed by the same allocated memory as
154
- * the given {ArrayBuffer}/{SharedArrayBuffer}.
155
- *
156
- *
157
- * @param arrayBuffer The ArrayBuffer with which to share memory.
158
- * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
159
- */
160
- constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
161
- /**
162
- * Allocates a new buffer containing the given {array} of octets.
163
- *
164
- * @param array The octets to store.
165
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
166
- */
167
- constructor(array: ReadonlyArray<any>);
168
- /**
169
- * Copies the passed {buffer} data onto a new {Buffer} instance.
170
- *
171
- * @param buffer The buffer to copy.
172
- * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
173
- */
174
- constructor(buffer: Buffer);
175
- /**
176
- * When passed a reference to the .buffer property of a TypedArray instance,
177
- * the newly created Buffer will share the same allocated memory as the TypedArray.
178
- * The optional {byteOffset} and {length} arguments specify a memory range
179
- * within the {arrayBuffer} that will be shared by the Buffer.
180
- *
181
- * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
182
- */
183
- static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
184
- /**
185
- * Creates a new Buffer using the passed {data}
186
- * @param data data to create a new Buffer
187
- */
188
- static from(data: Uint8Array | ReadonlyArray<number>): Buffer;
189
- static from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
190
- /**
191
- * Creates a new Buffer containing the given JavaScript string {str}.
192
- * If provided, the {encoding} parameter identifies the character encoding.
193
- * If not provided, {encoding} defaults to 'utf8'.
194
- */
195
- static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
196
- /**
197
- * Creates a new Buffer using the passed {data}
198
- * @param values to create a new Buffer
199
- */
200
- static of(...items: number[]): Buffer;
201
- /**
202
- * Returns true if {obj} is a Buffer
203
- *
204
- * @param obj object to test.
205
- */
206
- static isBuffer(obj: any): obj is Buffer;
207
- /**
208
- * Returns true if {encoding} is a valid encoding argument.
209
- * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
210
- *
211
- * @param encoding string to test.
212
- */
213
- static isEncoding(encoding: string): encoding is BufferEncoding;
214
- /**
215
- * Gives the actual byte length of a string. encoding defaults to 'utf8'.
216
- * This is not the same as String.prototype.length since that returns the number of characters in a string.
217
- *
218
- * @param string string to test.
219
- * @param encoding encoding used to evaluate (defaults to 'utf8')
220
- */
221
- static byteLength(
222
- string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
223
- encoding?: BufferEncoding
224
- ): number;
225
- /**
226
- * Returns a buffer which is the result of concatenating all the buffers in the list together.
227
- *
228
- * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
229
- * If the list has exactly one item, then the first item of the list is returned.
230
- * If the list has more than one item, then a new Buffer is created.
231
- *
232
- * @param list An array of Buffer objects to concatenate
233
- * @param totalLength Total length of the buffers when concatenated.
234
- * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
235
- */
236
- static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
237
- /**
238
- * The same as buf1.compare(buf2).
239
- */
240
- static compare(buf1: Uint8Array, buf2: Uint8Array): number;
241
- /**
242
- * Allocates a new buffer of {size} octets.
243
- *
244
- * @param size count of octets to allocate.
245
- * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
246
- * If parameter is omitted, buffer will be filled with zeros.
247
- * @param encoding encoding used for call to buf.fill while initalizing
248
- */
249
- static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
250
- /**
251
- * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
252
- * of the newly created Buffer are unknown and may contain sensitive data.
253
- *
254
- * @param size count of octets to allocate
255
- */
256
- static allocUnsafe(size: number): Buffer;
83
+ //#region ArrayLike.at()
84
+ interface RelativeIndexable<T> {
257
85
  /**
258
- * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
259
- * of the newly created Buffer are unknown and may contain sensitive data.
260
- *
261
- * @param size count of octets to allocate
262
- */
263
- static allocUnsafeSlow(size: number): Buffer;
264
- /**
265
- * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
266
- */
267
- static poolSize: number;
268
-
269
- write(string: string, encoding?: BufferEncoding): number;
270
- write(string: string, offset: number, encoding?: BufferEncoding): number;
271
- write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
272
- toString(encoding?: BufferEncoding, start?: number, end?: number): string;
273
- toJSON(): { type: 'Buffer'; data: number[] };
274
- equals(otherBuffer: Uint8Array): boolean;
275
- compare(
276
- otherBuffer: Uint8Array,
277
- targetStart?: number,
278
- targetEnd?: number,
279
- sourceStart?: number,
280
- sourceEnd?: number
281
- ): number;
282
- copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
283
- /**
284
- * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
285
- *
286
- * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
287
- *
288
- * @param begin Where the new `Buffer` will start. Default: `0`.
289
- * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
290
- */
291
- slice(begin?: number, end?: number): Buffer;
292
- /**
293
- * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
294
- *
295
- * This method is compatible with `Uint8Array#subarray()`.
296
- *
297
- * @param begin Where the new `Buffer` will start. Default: `0`.
298
- * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
299
- */
300
- subarray(begin?: number, end?: number): Buffer;
301
- writeBigInt64BE(value: bigint, offset?: number): number;
302
- writeBigInt64LE(value: bigint, offset?: number): number;
303
- writeBigUInt64BE(value: bigint, offset?: number): number;
304
- /**
305
- * @alias Buffer.writeBigUInt64BE
306
- * @since v14.10.0, v12.19.0
307
- */
308
- writeBigUint64BE(value: bigint, offset?: number): number;
309
- writeBigUInt64LE(value: bigint, offset?: number): number;
310
- /**
311
- * @alias Buffer.writeBigUInt64LE
312
- * @since v14.10.0, v12.19.0
313
- */
314
- writeBigUint64LE(value: bigint, offset?: number): number;
315
- writeUIntLE(value: number, offset: number, byteLength: number): number;
316
- /**
317
- * @alias Buffer.writeUIntLE
318
- * @since v14.9.0, v12.19.0
86
+ * Takes an integer value and returns the item at that index,
87
+ * allowing for positive and negative integers.
88
+ * Negative integers count back from the last item in the array.
319
89
  */
320
- writeUintLE(value: number, offset: number, byteLength: number): number;
321
- writeUIntBE(value: number, offset: number, byteLength: number): number;
322
- /**
323
- * @alias Buffer.writeUIntBE
324
- * @since v14.9.0, v12.19.0
325
- */
326
- writeUintBE(value: number, offset: number, byteLength: number): number;
327
- writeIntLE(value: number, offset: number, byteLength: number): number;
328
- writeIntBE(value: number, offset: number, byteLength: number): number;
329
- readBigUInt64BE(offset?: number): bigint;
330
- /**
331
- * @alias Buffer.readBigUInt64BE
332
- * @since v14.10.0, v12.19.0
333
- */
334
- readBigUint64BE(offset?: number): bigint;
335
- readBigUInt64LE(offset?: number): bigint;
336
- /**
337
- * @alias Buffer.readBigUInt64LE
338
- * @since v14.10.0, v12.19.0
339
- */
340
- readBigUint64LE(offset?: number): bigint;
341
- readBigInt64BE(offset?: number): bigint;
342
- readBigInt64LE(offset?: number): bigint;
343
- readUIntLE(offset: number, byteLength: number): number;
344
- /**
345
- * @alias Buffer.readUIntLE
346
- * @since v14.9.0, v12.19.0
347
- */
348
- readUintLE(offset: number, byteLength: number): number;
349
- readUIntBE(offset: number, byteLength: number): number;
350
- /**
351
- * @alias Buffer.readUIntBE
352
- * @since v14.9.0, v12.19.0
353
- */
354
- readUintBE(offset: number, byteLength: number): number;
355
- readIntLE(offset: number, byteLength: number): number;
356
- readIntBE(offset: number, byteLength: number): number;
357
- readUInt8(offset?: number): number;
358
- /**
359
- * @alias Buffer.readUInt8
360
- * @since v14.9.0, v12.19.0
361
- */
362
- readUint8(offset?: number): number;
363
- readUInt16LE(offset?: number): number;
364
- /**
365
- * @alias Buffer.readUInt16LE
366
- * @since v14.9.0, v12.19.0
367
- */
368
- readUint16LE(offset?: number): number;
369
- readUInt16BE(offset?: number): number;
370
- /**
371
- * @alias Buffer.readUInt16BE
372
- * @since v14.9.0, v12.19.0
373
- */
374
- readUint16BE(offset?: number): number;
375
- readUInt32LE(offset?: number): number;
376
- /**
377
- * @alias Buffer.readUInt32LE
378
- * @since v14.9.0, v12.19.0
379
- */
380
- readUint32LE(offset?: number): number;
381
- readUInt32BE(offset?: number): number;
382
- /**
383
- * @alias Buffer.readUInt32BE
384
- * @since v14.9.0, v12.19.0
385
- */
386
- readUint32BE(offset?: number): number;
387
- readInt8(offset?: number): number;
388
- readInt16LE(offset?: number): number;
389
- readInt16BE(offset?: number): number;
390
- readInt32LE(offset?: number): number;
391
- readInt32BE(offset?: number): number;
392
- readFloatLE(offset?: number): number;
393
- readFloatBE(offset?: number): number;
394
- readDoubleLE(offset?: number): number;
395
- readDoubleBE(offset?: number): number;
396
- reverse(): this;
397
- swap16(): Buffer;
398
- swap32(): Buffer;
399
- swap64(): Buffer;
400
- writeUInt8(value: number, offset?: number): number;
401
- /**
402
- * @alias Buffer.writeUInt8
403
- * @since v14.9.0, v12.19.0
404
- */
405
- writeUint8(value: number, offset?: number): number;
406
- writeUInt16LE(value: number, offset?: number): number;
407
- /**
408
- * @alias Buffer.writeUInt16LE
409
- * @since v14.9.0, v12.19.0
410
- */
411
- writeUint16LE(value: number, offset?: number): number;
412
- writeUInt16BE(value: number, offset?: number): number;
413
- /**
414
- * @alias Buffer.writeUInt16BE
415
- * @since v14.9.0, v12.19.0
416
- */
417
- writeUint16BE(value: number, offset?: number): number;
418
- writeUInt32LE(value: number, offset?: number): number;
419
- /**
420
- * @alias Buffer.writeUInt32LE
421
- * @since v14.9.0, v12.19.0
422
- */
423
- writeUint32LE(value: number, offset?: number): number;
424
- writeUInt32BE(value: number, offset?: number): number;
425
- /**
426
- * @alias Buffer.writeUInt32BE
427
- * @since v14.9.0, v12.19.0
428
- */
429
- writeUint32BE(value: number, offset?: number): number;
430
- writeInt8(value: number, offset?: number): number;
431
- writeInt16LE(value: number, offset?: number): number;
432
- writeInt16BE(value: number, offset?: number): number;
433
- writeInt32LE(value: number, offset?: number): number;
434
- writeInt32BE(value: number, offset?: number): number;
435
- writeFloatLE(value: number, offset?: number): number;
436
- writeFloatBE(value: number, offset?: number): number;
437
- writeDoubleLE(value: number, offset?: number): number;
438
- writeDoubleBE(value: number, offset?: number): number;
439
-
440
- fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
441
-
442
- indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
443
- lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
444
- entries(): IterableIterator<[number, number]>;
445
- includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
446
- keys(): IterableIterator<number>;
447
- values(): IterableIterator<number>;
90
+ at(index: number): T | undefined;
448
91
  }
92
+ interface String extends RelativeIndexable<string> {}
93
+ interface Array<T> extends RelativeIndexable<T> {}
94
+ interface ReadonlyArray<T> extends RelativeIndexable<T> {}
95
+ interface Int8Array extends RelativeIndexable<number> {}
96
+ interface Uint8Array extends RelativeIndexable<number> {}
97
+ interface Uint8ClampedArray extends RelativeIndexable<number> {}
98
+ interface Int16Array extends RelativeIndexable<number> {}
99
+ interface Uint16Array extends RelativeIndexable<number> {}
100
+ interface Int32Array extends RelativeIndexable<number> {}
101
+ interface Uint32Array extends RelativeIndexable<number> {}
102
+ interface Float32Array extends RelativeIndexable<number> {}
103
+ interface Float64Array extends RelativeIndexable<number> {}
104
+ interface BigInt64Array extends RelativeIndexable<bigint> {}
105
+ interface BigUint64Array extends RelativeIndexable<bigint> {}
106
+ //#endregion ArrayLike.at() end
449
107
 
450
108
  /*----------------------------------------------*
451
109
  * *
@@ -453,52 +111,11 @@ declare class Buffer extends Uint8Array {
453
111
  * *
454
112
  *-----------------------------------------------*/
455
113
  declare namespace NodeJS {
456
- interface InspectOptions {
457
- /**
458
- * If set to `true`, getters are going to be
459
- * inspected as well. If set to `'get'` only getters without setter are going
460
- * to be inspected. If set to `'set'` only getters having a corresponding
461
- * setter are going to be inspected. This might cause side effects depending on
462
- * the getter function.
463
- * @default `false`
464
- */
465
- getters?: 'get' | 'set' | boolean | undefined;
466
- showHidden?: boolean | undefined;
467
- /**
468
- * @default 2
469
- */
470
- depth?: number | null | undefined;
471
- colors?: boolean | undefined;
472
- customInspect?: boolean | undefined;
473
- showProxy?: boolean | undefined;
474
- maxArrayLength?: number | null | undefined;
475
- /**
476
- * Specifies the maximum number of characters to
477
- * include when formatting. Set to `null` or `Infinity` to show all elements.
478
- * Set to `0` or negative to show no characters.
479
- * @default Infinity
480
- */
481
- maxStringLength?: number | null | undefined;
482
- breakLength?: number | undefined;
483
- /**
484
- * Setting this to `false` causes each object key
485
- * to be displayed on a new line. It will also add new lines to text that is
486
- * longer than `breakLength`. If set to a number, the most `n` inner elements
487
- * are united on a single line as long as all properties fit into
488
- * `breakLength`. Short array elements are also grouped together. Note that no
489
- * text will be reduced below 16 characters, no matter the `breakLength` size.
490
- * For more information, see the example below.
491
- * @default `true`
492
- */
493
- compact?: boolean | number | undefined;
494
- sorted?: boolean | ((a: string, b: string) => number) | undefined;
495
- }
496
-
497
114
  interface CallSite {
498
115
  /**
499
116
  * Value of "this"
500
117
  */
501
- getThis(): any;
118
+ getThis(): unknown;
502
119
 
503
120
  /**
504
121
  * Type of "this" as a string.
@@ -593,99 +210,18 @@ declare namespace NodeJS {
593
210
  writable: boolean;
594
211
  write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
595
212
  write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
596
- end(cb?: () => void): this;
597
- end(data: string | Uint8Array, cb?: () => void): this;
598
- end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
213
+ end(cb?: () => void): void;
214
+ end(data: string | Uint8Array, cb?: () => void): void;
215
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
599
216
  }
600
217
 
601
218
  interface ReadWriteStream extends ReadableStream, WritableStream { }
602
219
 
603
- interface Global {
604
- Array: typeof Array;
605
- ArrayBuffer: typeof ArrayBuffer;
606
- Boolean: typeof Boolean;
607
- Buffer: typeof Buffer;
608
- DataView: typeof DataView;
609
- Date: typeof Date;
610
- Error: typeof Error;
611
- EvalError: typeof EvalError;
612
- Float32Array: typeof Float32Array;
613
- Float64Array: typeof Float64Array;
614
- Function: typeof Function;
615
- Infinity: typeof Infinity;
616
- Int16Array: typeof Int16Array;
617
- Int32Array: typeof Int32Array;
618
- Int8Array: typeof Int8Array;
619
- Intl: typeof Intl;
620
- JSON: typeof JSON;
621
- Map: MapConstructor;
622
- Math: typeof Math;
623
- NaN: typeof NaN;
624
- Number: typeof Number;
625
- Object: typeof Object;
626
- Promise: typeof Promise;
627
- RangeError: typeof RangeError;
628
- ReferenceError: typeof ReferenceError;
629
- RegExp: typeof RegExp;
630
- Set: SetConstructor;
631
- String: typeof String;
632
- Symbol: Function;
633
- SyntaxError: typeof SyntaxError;
634
- TypeError: typeof TypeError;
635
- URIError: typeof URIError;
636
- Uint16Array: typeof Uint16Array;
637
- Uint32Array: typeof Uint32Array;
638
- Uint8Array: typeof Uint8Array;
639
- Uint8ClampedArray: typeof Uint8ClampedArray;
640
- WeakMap: WeakMapConstructor;
641
- WeakSet: WeakSetConstructor;
642
- clearImmediate: (immediateId: Immediate) => void;
643
- clearInterval: (intervalId: Timeout) => void;
644
- clearTimeout: (timeoutId: Timeout) => void;
645
- decodeURI: typeof decodeURI;
646
- decodeURIComponent: typeof decodeURIComponent;
647
- encodeURI: typeof encodeURI;
648
- encodeURIComponent: typeof encodeURIComponent;
649
- escape: (str: string) => string;
650
- eval: typeof eval;
651
- global: Global;
652
- isFinite: typeof isFinite;
653
- isNaN: typeof isNaN;
654
- parseFloat: typeof parseFloat;
655
- parseInt: typeof parseInt;
656
- setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
657
- setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
658
- setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
659
- queueMicrotask: typeof queueMicrotask;
660
- undefined: typeof undefined;
661
- unescape: (str: string) => string;
662
- gc: () => void;
663
- v8debug?: any;
664
- }
665
-
666
220
  interface RefCounted {
667
221
  ref(): this;
668
222
  unref(): this;
669
223
  }
670
224
 
671
- // compatibility with older typings
672
- interface Timer extends RefCounted {
673
- hasRef(): boolean;
674
- refresh(): this;
675
- [Symbol.toPrimitive](): number;
676
- }
677
-
678
- interface Immediate extends RefCounted {
679
- hasRef(): boolean;
680
- _onImmediate: Function; // to distinguish it from the Timeout class
681
- }
682
-
683
- interface Timeout extends Timer {
684
- hasRef(): boolean;
685
- refresh(): this;
686
- [Symbol.toPrimitive](): number;
687
- }
688
-
689
225
  type TypedArray =
690
226
  | Uint8Array
691
227
  | Uint8ClampedArray
@@ -722,16 +258,20 @@ declare namespace NodeJS {
722
258
  '.node': (m: Module, filename: string) => any;
723
259
  }
724
260
  interface Module {
261
+ /**
262
+ * `true` if the module is running during the Node.js preload
263
+ */
264
+ isPreloading: boolean;
725
265
  exports: any;
726
266
  require: Require;
727
267
  id: string;
728
268
  filename: string;
729
269
  loaded: boolean;
730
- /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
270
+ /** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
731
271
  parent: Module | null | undefined;
732
272
  children: Module[];
733
273
  /**
734
- * @since 11.14.0
274
+ * @since v11.14.0
735
275
  *
736
276
  * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
737
277
  */