@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,45 @@
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
+ declare module 'stream/promises' {
5
+ import { FinishedOptions, PipelineSource, PipelineTransform, PipelineDestination, PipelinePromise, PipelineOptions } from 'node:stream';
6
+ function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
7
+ function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(source: A, destination: B, options?: PipelineOptions): PipelinePromise<B>;
8
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, B extends PipelineDestination<T1, any>>(
9
+ source: A,
10
+ transform1: T1,
11
+ destination: B,
12
+ options?: PipelineOptions
13
+ ): PipelinePromise<B>;
14
+ function pipeline<A extends PipelineSource<any>, T1 extends PipelineTransform<A, any>, T2 extends PipelineTransform<T1, any>, B extends PipelineDestination<T2, any>>(
15
+ source: A,
16
+ transform1: T1,
17
+ transform2: T2,
18
+ destination: B,
19
+ options?: PipelineOptions
20
+ ): PipelinePromise<B>;
21
+ function pipeline<
22
+ A extends PipelineSource<any>,
23
+ T1 extends PipelineTransform<A, any>,
24
+ T2 extends PipelineTransform<T1, any>,
25
+ T3 extends PipelineTransform<T2, any>,
26
+ B extends PipelineDestination<T3, any>
27
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, destination: B, options?: PipelineOptions): PipelinePromise<B>;
28
+ function pipeline<
29
+ A extends PipelineSource<any>,
30
+ T1 extends PipelineTransform<A, any>,
31
+ T2 extends PipelineTransform<T1, any>,
32
+ T3 extends PipelineTransform<T2, any>,
33
+ T4 extends PipelineTransform<T3, any>,
34
+ B extends PipelineDestination<T4, any>
35
+ >(source: A, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: B, options?: PipelineOptions): PipelinePromise<B>;
36
+ function pipeline(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, options?: PipelineOptions): Promise<void>;
37
+ function pipeline(
38
+ stream1: NodeJS.ReadableStream,
39
+ stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
40
+ ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
41
+ ): Promise<void>;
42
+ }
43
+ declare module 'node:stream/promises' {
44
+ export * from 'stream/promises';
45
+ }
@@ -0,0 +1,333 @@
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
+ declare module 'stream/web' {
5
+ // stub module, pending copy&paste from .d.ts or manual impl
6
+ // copy from lib.dom.d.ts
7
+ interface ReadableWritablePair<R = any, W = any> {
8
+ readable: ReadableStream<R>;
9
+ /**
10
+ * Provides a convenient, chainable way of piping this readable stream
11
+ * through a transform stream (or any other { writable, readable }
12
+ * pair). It simply pipes the stream into the writable side of the
13
+ * supplied pair, and returns the readable side for further use.
14
+ *
15
+ * Piping a stream will lock it for the duration of the pipe, preventing
16
+ * any other consumer from acquiring a reader.
17
+ */
18
+ writable: WritableStream<W>;
19
+ }
20
+ interface StreamPipeOptions {
21
+ preventAbort?: boolean;
22
+ preventCancel?: boolean;
23
+ /**
24
+ * Pipes this readable stream to a given writable stream destination.
25
+ * The way in which the piping process behaves under various error
26
+ * conditions can be customized with a number of passed options. It
27
+ * returns a promise that fulfills when the piping process completes
28
+ * successfully, or rejects if any errors were encountered.
29
+ *
30
+ * Piping a stream will lock it for the duration of the pipe, preventing
31
+ * any other consumer from acquiring a reader.
32
+ *
33
+ * Errors and closures of the source and destination streams propagate
34
+ * as follows:
35
+ *
36
+ * An error in this source readable stream will abort destination,
37
+ * unless preventAbort is truthy. The returned promise will be rejected
38
+ * with the source's error, or with any error that occurs during
39
+ * aborting the destination.
40
+ *
41
+ * An error in destination will cancel this source readable stream,
42
+ * unless preventCancel is truthy. The returned promise will be rejected
43
+ * with the destination's error, or with any error that occurs during
44
+ * canceling the source.
45
+ *
46
+ * When this source readable stream closes, destination will be closed,
47
+ * unless preventClose is truthy. The returned promise will be fulfilled
48
+ * once this process completes, unless an error is encountered while
49
+ * closing the destination, in which case it will be rejected with that
50
+ * error.
51
+ *
52
+ * If destination starts out closed or closing, this source readable
53
+ * stream will be canceled, unless preventCancel is true. The returned
54
+ * promise will be rejected with an error indicating piping to a closed
55
+ * stream failed, or with any error that occurs during canceling the
56
+ * source.
57
+ *
58
+ * The signal option can be set to an AbortSignal to allow aborting an
59
+ * ongoing pipe operation via the corresponding AbortController. In this
60
+ * case, this source readable stream will be canceled, and destination
61
+ * aborted, unless the respective options preventCancel or preventAbort
62
+ * are set.
63
+ */
64
+ preventClose?: boolean;
65
+ signal?: AbortSignal;
66
+ }
67
+ interface ReadableStreamGenericReader {
68
+ readonly closed: Promise<undefined>;
69
+ cancel(reason?: any): Promise<void>;
70
+ }
71
+ interface ReadableStreamDefaultReadValueResult<T> {
72
+ done: false;
73
+ value: T;
74
+ }
75
+ interface ReadableStreamDefaultReadDoneResult {
76
+ done: true;
77
+ value?: undefined;
78
+ }
79
+ type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
80
+ type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
81
+ interface ReadableByteStreamControllerCallback {
82
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
83
+ }
84
+ interface UnderlyingSinkAbortCallback {
85
+ (reason?: any): void | PromiseLike<void>;
86
+ }
87
+ interface UnderlyingSinkCloseCallback {
88
+ (): void | PromiseLike<void>;
89
+ }
90
+ interface UnderlyingSinkStartCallback {
91
+ (controller: WritableStreamDefaultController): any;
92
+ }
93
+ interface UnderlyingSinkWriteCallback<W> {
94
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
95
+ }
96
+ interface UnderlyingSourceCancelCallback {
97
+ (reason?: any): void | PromiseLike<void>;
98
+ }
99
+ interface UnderlyingSourcePullCallback<R> {
100
+ (controller: ReadableStreamController<R>): void | PromiseLike<void>;
101
+ }
102
+ interface UnderlyingSourceStartCallback<R> {
103
+ (controller: ReadableStreamController<R>): any;
104
+ }
105
+ interface TransformerFlushCallback<O> {
106
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
107
+ }
108
+ interface TransformerStartCallback<O> {
109
+ (controller: TransformStreamDefaultController<O>): any;
110
+ }
111
+ interface TransformerTransformCallback<I, O> {
112
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
113
+ }
114
+ interface UnderlyingByteSource {
115
+ autoAllocateChunkSize?: number;
116
+ cancel?: ReadableStreamErrorCallback;
117
+ pull?: ReadableByteStreamControllerCallback;
118
+ start?: ReadableByteStreamControllerCallback;
119
+ type: 'bytes';
120
+ }
121
+ interface UnderlyingSource<R = any> {
122
+ cancel?: UnderlyingSourceCancelCallback;
123
+ pull?: UnderlyingSourcePullCallback<R>;
124
+ start?: UnderlyingSourceStartCallback<R>;
125
+ type?: undefined;
126
+ }
127
+ interface UnderlyingSink<W = any> {
128
+ abort?: UnderlyingSinkAbortCallback;
129
+ close?: UnderlyingSinkCloseCallback;
130
+ start?: UnderlyingSinkStartCallback;
131
+ type?: undefined;
132
+ write?: UnderlyingSinkWriteCallback<W>;
133
+ }
134
+ interface ReadableStreamErrorCallback {
135
+ (reason: any): void | PromiseLike<void>;
136
+ }
137
+ /** This Streams API interface represents a readable stream of byte data. */
138
+ interface ReadableStream<R = any> {
139
+ readonly locked: boolean;
140
+ cancel(reason?: any): Promise<void>;
141
+ getReader(): ReadableStreamDefaultReader<R>;
142
+ pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
143
+ pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
144
+ tee(): [ReadableStream<R>, ReadableStream<R>];
145
+ values(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
146
+ [Symbol.asyncIterator](): AsyncIterableIterator<R>;
147
+ }
148
+ const ReadableStream: {
149
+ prototype: ReadableStream;
150
+ new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
151
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
152
+ };
153
+ interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
154
+ read(): Promise<ReadableStreamDefaultReadResult<R>>;
155
+ releaseLock(): void;
156
+ }
157
+ const ReadableStreamDefaultReader: {
158
+ prototype: ReadableStreamDefaultReader;
159
+ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
160
+ };
161
+ const ReadableStreamBYOBReader: any;
162
+ const ReadableStreamBYOBRequest: any;
163
+ interface ReadableByteStreamController {
164
+ readonly byobRequest: undefined;
165
+ readonly desiredSize: number | null;
166
+ close(): void;
167
+ enqueue(chunk: ArrayBufferView): void;
168
+ error(error?: any): void;
169
+ }
170
+ const ReadableByteStreamController: {
171
+ prototype: ReadableByteStreamController;
172
+ new (): ReadableByteStreamController;
173
+ };
174
+ interface ReadableStreamDefaultController<R = any> {
175
+ readonly desiredSize: number | null;
176
+ close(): void;
177
+ enqueue(chunk?: R): void;
178
+ error(e?: any): void;
179
+ }
180
+ const ReadableStreamDefaultController: {
181
+ prototype: ReadableStreamDefaultController;
182
+ new (): ReadableStreamDefaultController;
183
+ };
184
+ interface Transformer<I = any, O = any> {
185
+ flush?: TransformerFlushCallback<O>;
186
+ readableType?: undefined;
187
+ start?: TransformerStartCallback<O>;
188
+ transform?: TransformerTransformCallback<I, O>;
189
+ writableType?: undefined;
190
+ }
191
+ interface TransformStream<I = any, O = any> {
192
+ readonly readable: ReadableStream<O>;
193
+ readonly writable: WritableStream<I>;
194
+ }
195
+ const TransformStream: {
196
+ prototype: TransformStream;
197
+ new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
198
+ };
199
+ interface TransformStreamDefaultController<O = any> {
200
+ readonly desiredSize: number | null;
201
+ enqueue(chunk?: O): void;
202
+ error(reason?: any): void;
203
+ terminate(): void;
204
+ }
205
+ const TransformStreamDefaultController: {
206
+ prototype: TransformStreamDefaultController;
207
+ new (): TransformStreamDefaultController;
208
+ };
209
+ /**
210
+ * This Streams API interface provides a standard abstraction for writing
211
+ * streaming data to a destination, known as a sink. This object comes with
212
+ * built-in back pressure and queuing.
213
+ */
214
+ interface WritableStream<W = any> {
215
+ readonly locked: boolean;
216
+ abort(reason?: any): Promise<void>;
217
+ close(): Promise<void>;
218
+ getWriter(): WritableStreamDefaultWriter<W>;
219
+ }
220
+ const WritableStream: {
221
+ prototype: WritableStream;
222
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
223
+ };
224
+ /**
225
+ * This Streams API interface is the object returned by
226
+ * WritableStream.getWriter() and once created locks the < writer to the
227
+ * WritableStream ensuring that no other streams can write to the underlying
228
+ * sink.
229
+ */
230
+ interface WritableStreamDefaultWriter<W = any> {
231
+ readonly closed: Promise<undefined>;
232
+ readonly desiredSize: number | null;
233
+ readonly ready: Promise<undefined>;
234
+ abort(reason?: any): Promise<void>;
235
+ close(): Promise<void>;
236
+ releaseLock(): void;
237
+ write(chunk?: W): Promise<void>;
238
+ }
239
+ const WritableStreamDefaultWriter: {
240
+ prototype: WritableStreamDefaultWriter;
241
+ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
242
+ };
243
+ /**
244
+ * This Streams API interface represents a controller allowing control of a
245
+ * WritableStream's state. When constructing a WritableStream, the
246
+ * underlying sink is given a corresponding WritableStreamDefaultController
247
+ * instance to manipulate.
248
+ */
249
+ interface WritableStreamDefaultController {
250
+ error(e?: any): void;
251
+ }
252
+ const WritableStreamDefaultController: {
253
+ prototype: WritableStreamDefaultController;
254
+ new (): WritableStreamDefaultController;
255
+ };
256
+ interface QueuingStrategy<T = any> {
257
+ highWaterMark?: number;
258
+ size?: QueuingStrategySize<T>;
259
+ }
260
+ interface QueuingStrategySize<T = any> {
261
+ (chunk?: T): number;
262
+ }
263
+ interface QueuingStrategyInit {
264
+ /**
265
+ * Creates a new ByteLengthQueuingStrategy with the provided high water
266
+ * mark.
267
+ *
268
+ * Note that the provided high water mark will not be validated ahead of
269
+ * time. Instead, if it is negative, NaN, or not a number, the resulting
270
+ * ByteLengthQueuingStrategy will cause the corresponding stream
271
+ * constructor to throw.
272
+ */
273
+ highWaterMark: number;
274
+ }
275
+ /**
276
+ * This Streams API interface provides a built-in byte length queuing
277
+ * strategy that can be used when constructing streams.
278
+ */
279
+ interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
280
+ readonly highWaterMark: number;
281
+ readonly size: QueuingStrategySize<ArrayBufferView>;
282
+ }
283
+ const ByteLengthQueuingStrategy: {
284
+ prototype: ByteLengthQueuingStrategy;
285
+ new (init: QueuingStrategyInit): ByteLengthQueuingStrategy;
286
+ };
287
+ /**
288
+ * This Streams API interface provides a built-in byte length queuing
289
+ * strategy that can be used when constructing streams.
290
+ */
291
+ interface CountQueuingStrategy extends QueuingStrategy {
292
+ readonly highWaterMark: number;
293
+ readonly size: QueuingStrategySize;
294
+ }
295
+ const CountQueuingStrategy: {
296
+ prototype: CountQueuingStrategy;
297
+ new (init: QueuingStrategyInit): CountQueuingStrategy;
298
+ };
299
+ interface TextEncoderStream {
300
+ /** Returns "utf-8". */
301
+ readonly encoding: 'utf-8';
302
+ readonly readable: ReadableStream<Uint8Array>;
303
+ readonly writable: WritableStream<string>;
304
+ readonly [Symbol.toStringTag]: string;
305
+ }
306
+ const TextEncoderStream: {
307
+ prototype: TextEncoderStream;
308
+ new (): TextEncoderStream;
309
+ };
310
+ interface TextDecoderOptions {
311
+ fatal?: boolean;
312
+ ignoreBOM?: boolean;
313
+ }
314
+ type BufferSource = ArrayBufferView | ArrayBuffer;
315
+ interface TextDecoderStream {
316
+ /** Returns encoding's name, lower cased. */
317
+ readonly encoding: string;
318
+ /** Returns `true` if error mode is "fatal", and `false` otherwise. */
319
+ readonly fatal: boolean;
320
+ /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
321
+ readonly ignoreBOM: boolean;
322
+ readonly readable: ReadableStream<string>;
323
+ readonly writable: WritableStream<BufferSource>;
324
+ readonly [Symbol.toStringTag]: string;
325
+ }
326
+ const TextDecoderStream: {
327
+ prototype: TextDecoderStream;
328
+ new (label?: string, options?: TextDecoderOptions): TextDecoderStream;
329
+ };
330
+ }
331
+ declare module 'node:stream/web' {
332
+ export * from 'stream/web';
333
+ }