@idlebox/stripe-node-types 24.0.14-patch.0 → 24.0.15

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 (134) hide show
  1. package/README.md +1 -1
  2. package/assert/strict.d.ts +113 -1
  3. package/assert.d.ts +162 -248
  4. package/async_hooks.d.ts +20 -5
  5. package/buffer.buffer.d.ts +24 -6
  6. package/buffer.d.ts +63 -168
  7. package/child_process.d.ts +117 -223
  8. package/cluster.d.ts +251 -329
  9. package/compatibility/iterators.d.ts +15 -0
  10. package/console.d.ts +60 -346
  11. package/constants.d.ts +15 -1
  12. package/crypto.d.ts +713 -1149
  13. package/dgram.d.ts +30 -50
  14. package/diagnostics_channel.d.ts +16 -3
  15. package/dns/promises.d.ts +15 -0
  16. package/dns.d.ts +150 -131
  17. package/domain.d.ts +25 -14
  18. package/events.d.ts +858 -719
  19. package/fs/promises.d.ts +117 -53
  20. package/fs.d.ts +729 -484
  21. package/globals.d.ts +142 -344
  22. package/globals.typedarray.d.ts +94 -0
  23. package/http.d.ts +358 -246
  24. package/http2.d.ts +578 -711
  25. package/https.d.ts +85 -216
  26. package/index.d.ts +39 -3
  27. package/inspector/promises.d.ts +54 -0
  28. package/inspector.d.ts +180 -3936
  29. package/inspector.generated.d.ts +4242 -0
  30. package/module.d.ts +60 -95
  31. package/my-shim.d.ts +15 -0
  32. package/net.d.ts +102 -186
  33. package/os.d.ts +32 -6
  34. package/package.json +3 -8
  35. package/path/posix.d.ts +20 -0
  36. package/path/win32.d.ts +20 -0
  37. package/path.d.ts +132 -122
  38. package/perf_hooks.d.ts +310 -644
  39. package/process.d.ts +192 -138
  40. package/punycode.d.ts +17 -2
  41. package/querystring.d.ts +16 -1
  42. package/quic.d.ts +926 -0
  43. package/readline/promises.d.ts +16 -1
  44. package/readline.d.ts +80 -118
  45. package/repl.d.ts +98 -96
  46. package/sea.d.ts +25 -1
  47. package/sqlite.d.ts +277 -13
  48. package/stream/consumers.d.ts +22 -7
  49. package/stream/promises.d.ts +148 -12
  50. package/stream/web.d.ts +187 -494
  51. package/stream.d.ts +608 -490
  52. package/string_decoder.d.ts +18 -3
  53. package/test/reporters.d.ts +112 -0
  54. package/test.d.ts +238 -199
  55. package/timers/promises.d.ts +16 -1
  56. package/timers.d.ts +16 -129
  57. package/tls.d.ts +163 -163
  58. package/trace_events.d.ts +21 -6
  59. package/ts5.6/buffer.buffer.d.ts +25 -8
  60. package/ts5.6/compatibility/float16array.d.ts +15 -0
  61. package/ts5.6/globals.typedarray.d.ts +31 -0
  62. package/ts5.6/index.d.ts +39 -3
  63. package/ts5.7/compatibility/float16array.d.ts +15 -0
  64. package/ts5.7/index.d.ts +39 -3
  65. package/tty.d.ts +70 -13
  66. package/undici-types/agent.d.ts +20 -4
  67. package/undici-types/api.d.ts +15 -0
  68. package/undici-types/balanced-pool.d.ts +15 -0
  69. package/undici-types/cache-interceptor.d.ts +15 -0
  70. package/undici-types/cache.d.ts +15 -0
  71. package/undici-types/client-stats.d.ts +31 -0
  72. package/undici-types/client.d.ts +21 -5
  73. package/undici-types/connector.d.ts +15 -0
  74. package/undici-types/content-type.d.ts +15 -0
  75. package/undici-types/cookies.d.ts +15 -0
  76. package/undici-types/diagnostics-channel.d.ts +24 -1
  77. package/undici-types/dispatcher.d.ts +18 -8
  78. package/undici-types/env-http-proxy-agent.d.ts +17 -1
  79. package/undici-types/errors.d.ts +20 -15
  80. package/undici-types/eventsource.d.ts +24 -4
  81. package/undici-types/fetch.d.ts +16 -0
  82. package/undici-types/formdata.d.ts +15 -0
  83. package/undici-types/global-dispatcher.d.ts +15 -0
  84. package/undici-types/global-origin.d.ts +15 -0
  85. package/undici-types/h2c-client.d.ts +15 -2
  86. package/undici-types/handlers.d.ts +16 -1
  87. package/undici-types/header.d.ts +15 -0
  88. package/undici-types/index.d.ts +21 -1
  89. package/undici-types/interceptors.d.ts +20 -0
  90. package/undici-types/mock-agent.d.ts +18 -0
  91. package/undici-types/mock-call-history.d.ts +15 -0
  92. package/undici-types/mock-client.d.ts +17 -0
  93. package/undici-types/mock-errors.d.ts +15 -0
  94. package/undici-types/mock-interceptor.d.ts +17 -1
  95. package/undici-types/mock-pool.d.ts +17 -0
  96. package/undici-types/package.json +1 -1
  97. package/undici-types/patch.d.ts +15 -0
  98. package/undici-types/pool-stats.d.ts +15 -0
  99. package/undici-types/pool.d.ts +17 -0
  100. package/undici-types/proxy-agent.d.ts +16 -0
  101. package/undici-types/readable.d.ts +15 -0
  102. package/undici-types/retry-agent.d.ts +15 -0
  103. package/undici-types/retry-handler.d.ts +24 -0
  104. package/undici-types/snapshot-agent.d.ts +125 -0
  105. package/undici-types/util.d.ts +15 -0
  106. package/undici-types/utility.d.ts +15 -0
  107. package/undici-types/webidl.d.ts +126 -36
  108. package/undici-types/websocket.d.ts +18 -1
  109. package/url.d.ts +107 -587
  110. package/util/types.d.ts +571 -0
  111. package/util.d.ts +158 -792
  112. package/v8.d.ts +82 -7
  113. package/vm.d.ts +267 -108
  114. package/wasi.d.ts +38 -2
  115. package/web-globals/abortcontroller.d.ts +75 -0
  116. package/web-globals/blob.d.ts +39 -0
  117. package/web-globals/console.d.ts +25 -0
  118. package/web-globals/crypto.d.ts +55 -0
  119. package/web-globals/domexception.d.ts +84 -0
  120. package/web-globals/encoding.d.ts +27 -0
  121. package/{dom-events.d.ts → web-globals/events.d.ts} +72 -50
  122. package/web-globals/fetch.d.ts +70 -0
  123. package/web-globals/importmeta.d.ts +29 -0
  124. package/web-globals/messaging.d.ts +39 -0
  125. package/web-globals/navigator.d.ts +41 -0
  126. package/web-globals/performance.d.ts +61 -0
  127. package/web-globals/storage.d.ts +40 -0
  128. package/web-globals/streams.d.ts +131 -0
  129. package/web-globals/timers.d.ts +60 -0
  130. package/web-globals/url.d.ts +40 -0
  131. package/worker_threads.d.ts +306 -349
  132. package/zlib.d.ts +59 -94
  133. package/ts5.1/compatibility/disposable.d.ts +0 -13
  134. package/ts5.1/index.d.ts +0 -100
package/globals.d.ts CHANGED
@@ -1,368 +1,166 @@
1
- export {}; // Make this a module
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
2
5
 
3
- // #region Fetch and friends
4
- // Conditional type aliases, used at the end of this file.
5
- // Will either be empty if lib.dom (or lib.webworker) is included, or the undici version otherwise.
6
- type _Request = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').Request;
7
- type _Response = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').Response;
8
- type _FormData = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').FormData;
9
- type _Headers = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').Headers;
10
- type _MessageEvent = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').MessageEvent;
11
- type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
12
- : import('./undici-types').RequestInit;
13
- type _ResponseInit = typeof globalThis extends { onmessage: any } ? {}
14
- : import('./undici-types').ResponseInit;
15
- type _WebSocket = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').WebSocket;
16
- type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').EventSource;
17
- type _CloseEvent = typeof globalThis extends { onmessage: any } ? {} : import('./undici-types').CloseEvent;
18
- // #endregion Fetch and friends
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
19
14
 
20
- // Conditional type definitions for webstorage interface, which conflicts with lib.dom otherwise.
21
- type _Storage = typeof globalThis extends { onabort: any } ? {} : {
22
- readonly length: number;
23
- clear(): void;
24
- getItem(key: string): string | null;
25
- key(index: number): string | null;
26
- removeItem(key: string): void;
27
- setItem(key: string, value: string): void;
28
- [key: string]: any;
29
- };
30
15
 
31
- // #region DOMException
32
- type _DOMException = typeof globalThis extends { onmessage: any } ? {} : NodeDOMException;
33
- interface NodeDOMException extends Error {
34
- readonly code: number;
35
- readonly message: string;
36
- readonly name: string;
37
- readonly INDEX_SIZE_ERR: 1;
38
- readonly DOMSTRING_SIZE_ERR: 2;
39
- readonly HIERARCHY_REQUEST_ERR: 3;
40
- readonly WRONG_DOCUMENT_ERR: 4;
41
- readonly INVALID_CHARACTER_ERR: 5;
42
- readonly NO_DATA_ALLOWED_ERR: 6;
43
- readonly NO_MODIFICATION_ALLOWED_ERR: 7;
44
- readonly NOT_FOUND_ERR: 8;
45
- readonly NOT_SUPPORTED_ERR: 9;
46
- readonly INUSE_ATTRIBUTE_ERR: 10;
47
- readonly INVALID_STATE_ERR: 11;
48
- readonly SYNTAX_ERR: 12;
49
- readonly INVALID_MODIFICATION_ERR: 13;
50
- readonly NAMESPACE_ERR: 14;
51
- readonly INVALID_ACCESS_ERR: 15;
52
- readonly VALIDATION_ERR: 16;
53
- readonly TYPE_MISMATCH_ERR: 17;
54
- readonly SECURITY_ERR: 18;
55
- readonly NETWORK_ERR: 19;
56
- readonly ABORT_ERR: 20;
57
- readonly URL_MISMATCH_ERR: 21;
58
- readonly QUOTA_EXCEEDED_ERR: 22;
59
- readonly TIMEOUT_ERR: 23;
60
- readonly INVALID_NODE_TYPE_ERR: 24;
61
- readonly DATA_CLONE_ERR: 25;
62
- }
63
- interface NodeDOMExceptionConstructor {
64
- prototype: DOMException;
65
- new(message?: string, nameOrOptions?: string | { name?: string; cause?: unknown }): DOMException;
66
- readonly INDEX_SIZE_ERR: 1;
67
- readonly DOMSTRING_SIZE_ERR: 2;
68
- readonly HIERARCHY_REQUEST_ERR: 3;
69
- readonly WRONG_DOCUMENT_ERR: 4;
70
- readonly INVALID_CHARACTER_ERR: 5;
71
- readonly NO_DATA_ALLOWED_ERR: 6;
72
- readonly NO_MODIFICATION_ALLOWED_ERR: 7;
73
- readonly NOT_FOUND_ERR: 8;
74
- readonly NOT_SUPPORTED_ERR: 9;
75
- readonly INUSE_ATTRIBUTE_ERR: 10;
76
- readonly INVALID_STATE_ERR: 11;
77
- readonly SYNTAX_ERR: 12;
78
- readonly INVALID_MODIFICATION_ERR: 13;
79
- readonly NAMESPACE_ERR: 14;
80
- readonly INVALID_ACCESS_ERR: 15;
81
- readonly VALIDATION_ERR: 16;
82
- readonly TYPE_MISMATCH_ERR: 17;
83
- readonly SECURITY_ERR: 18;
84
- readonly NETWORK_ERR: 19;
85
- readonly ABORT_ERR: 20;
86
- readonly URL_MISMATCH_ERR: 21;
87
- readonly QUOTA_EXCEEDED_ERR: 22;
88
- readonly TIMEOUT_ERR: 23;
89
- readonly INVALID_NODE_TYPE_ERR: 24;
90
- readonly DATA_CLONE_ERR: 25;
91
- }
92
- // #endregion DOMException
93
-
94
- declare global {
95
- var global: typeof globalThis;
16
+ declare var global: typeof globalThis;
96
17
 
97
- var process: NodeJS.Process;
98
- var console: Console;
99
-
100
- interface ErrorConstructor {
101
- /**
102
- * Creates a `.stack` property on `targetObject`, which when accessed returns
103
- * a string representing the location in the code at which
104
- * `Error.captureStackTrace()` was called.
105
- *
106
- * ```js
107
- * const myObject = {};
108
- * Error.captureStackTrace(myObject);
109
- * myObject.stack; // Similar to `new Error().stack`
110
- * ```
111
- *
112
- * The first line of the trace will be prefixed with
113
- * `${myObject.name}: ${myObject.message}`.
114
- *
115
- * The optional `constructorOpt` argument accepts a function. If given, all frames
116
- * above `constructorOpt`, including `constructorOpt`, will be omitted from the
117
- * generated stack trace.
118
- *
119
- * The `constructorOpt` argument is useful for hiding implementation
120
- * details of error generation from the user. For instance:
121
- *
122
- * ```js
123
- * function a() {
124
- * b();
125
- * }
126
- *
127
- * function b() {
128
- * c();
129
- * }
130
- *
131
- * function c() {
132
- * // Create an error without stack trace to avoid calculating the stack trace twice.
133
- * const { stackTraceLimit } = Error;
134
- * Error.stackTraceLimit = 0;
135
- * const error = new Error();
136
- * Error.stackTraceLimit = stackTraceLimit;
137
- *
138
- * // Capture the stack trace above function b
139
- * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
140
- * throw error;
141
- * }
142
- *
143
- * a();
144
- * ```
145
- */
146
- captureStackTrace(targetObject: object, constructorOpt?: Function): void;
147
- /**
148
- * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
149
- */
150
- prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
151
- /**
152
- * The `Error.stackTraceLimit` property specifies the number of stack frames
153
- * collected by a stack trace (whether generated by `new Error().stack` or
154
- * `Error.captureStackTrace(obj)`).
155
- *
156
- * The default value is `10` but may be set to any valid JavaScript number. Changes
157
- * will affect any stack trace captured _after_ the value has been changed.
158
- *
159
- * If set to a non-number value, or set to a negative number, stack traces will
160
- * not capture any frames.
161
- */
162
- stackTraceLimit: number;
163
- }
18
+ declare var process: NodeJS.Process;
164
19
 
20
+ interface ErrorConstructor {
165
21
  /**
166
- * Enable this API with the `--expose-gc` CLI flag.
22
+ * Creates a `.stack` property on `targetObject`, which when accessed returns
23
+ * a string representing the location in the code at which
24
+ * `Error.captureStackTrace()` was called.
25
+ *
26
+ * ```js
27
+ * const myObject = {};
28
+ * Error.captureStackTrace(myObject);
29
+ * myObject.stack; // Similar to `new Error().stack`
30
+ * ```
31
+ *
32
+ * The first line of the trace will be prefixed with
33
+ * `${myObject.name}: ${myObject.message}`.
34
+ *
35
+ * The optional `constructorOpt` argument accepts a function. If given, all frames
36
+ * above `constructorOpt`, including `constructorOpt`, will be omitted from the
37
+ * generated stack trace.
38
+ *
39
+ * The `constructorOpt` argument is useful for hiding implementation
40
+ * details of error generation from the user. For instance:
41
+ *
42
+ * ```js
43
+ * function a() {
44
+ * b();
45
+ * }
46
+ *
47
+ * function b() {
48
+ * c();
49
+ * }
50
+ *
51
+ * function c() {
52
+ * // Create an error without stack trace to avoid calculating the stack trace twice.
53
+ * const { stackTraceLimit } = Error;
54
+ * Error.stackTraceLimit = 0;
55
+ * const error = new Error();
56
+ * Error.stackTraceLimit = stackTraceLimit;
57
+ *
58
+ * // Capture the stack trace above function b
59
+ * Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
60
+ * throw error;
61
+ * }
62
+ *
63
+ * a();
64
+ * ```
167
65
  */
168
- var gc: NodeJS.GCFunction | undefined;
169
-
170
- namespace NodeJS {
171
- interface CallSite {
172
- getColumnNumber(): number | null;
173
- getEnclosingColumnNumber(): number | null;
174
- getEnclosingLineNumber(): number | null;
175
- getEvalOrigin(): string | undefined;
176
- getFileName(): string | null;
177
- getFunction(): Function | undefined;
178
- getFunctionName(): string | null;
179
- getLineNumber(): number | null;
180
- getMethodName(): string | null;
181
- getPosition(): number;
182
- getPromiseIndex(): number | null;
183
- getScriptHash(): string;
184
- getScriptNameOrSourceURL(): string | null;
185
- getThis(): unknown;
186
- getTypeName(): string | null;
187
- isAsync(): boolean;
188
- isConstructor(): boolean;
189
- isEval(): boolean;
190
- isNative(): boolean;
191
- isPromiseAll(): boolean;
192
- isToplevel(): boolean;
193
- }
194
-
195
- interface ErrnoException extends Error {
196
- errno?: number | undefined;
197
- code?: string | undefined;
198
- path?: string | undefined;
199
- syscall?: string | undefined;
200
- }
201
-
202
- interface ReadableStream extends EventEmitter {
203
- readable: boolean;
204
- read(size?: number): string | Buffer;
205
- setEncoding(encoding: BufferEncoding): this;
206
- pause(): this;
207
- resume(): this;
208
- isPaused(): boolean;
209
- pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
210
- unpipe(destination?: WritableStream): this;
211
- unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
212
- wrap(oldStream: ReadableStream): this;
213
- [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
214
- }
215
-
216
- interface WritableStream extends EventEmitter {
217
- writable: boolean;
218
- write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
219
- write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
220
- end(cb?: () => void): this;
221
- end(data: string | Uint8Array, cb?: () => void): this;
222
- end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
223
- }
224
-
225
- interface ReadWriteStream extends ReadableStream, WritableStream {}
226
-
227
- interface RefCounted {
228
- ref(): this;
229
- unref(): this;
230
- }
231
-
232
- interface Dict<T> {
233
- [key: string]: T | undefined;
234
- }
235
-
236
- interface ReadOnlyDict<T> {
237
- readonly [key: string]: T | undefined;
238
- }
239
-
240
- interface GCFunction {
241
- (minor?: boolean): void;
242
- (options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
243
- (options: NodeJS.GCOptions): void;
244
- }
245
-
246
- interface GCOptions {
247
- execution?: "sync" | "async" | undefined;
248
- flavor?: "regular" | "last-resort" | undefined;
249
- type?: "major-snapshot" | "major" | "minor" | undefined;
250
- filename?: string | undefined;
251
- }
252
-
253
- /** An iterable iterator returned by the Node.js API. */
254
- interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
255
- [Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
256
- }
66
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
67
+ /**
68
+ * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
69
+ */
70
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
71
+ /**
72
+ * The `Error.stackTraceLimit` property specifies the number of stack frames
73
+ * collected by a stack trace (whether generated by `new Error().stack` or
74
+ * `Error.captureStackTrace(obj)`).
75
+ *
76
+ * The default value is `10` but may be set to any valid JavaScript number. Changes
77
+ * will affect any stack trace captured _after_ the value has been changed.
78
+ *
79
+ * If set to a non-number value, or set to a negative number, stack traces will
80
+ * not capture any frames.
81
+ */
82
+ stackTraceLimit: number;
83
+ }
257
84
 
258
- /** An async iterable iterator returned by the Node.js API. */
259
- interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
260
- [Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
261
- }
85
+ /**
86
+ * Enable this API with the `--expose-gc` CLI flag.
87
+ */
88
+ declare var gc: NodeJS.GCFunction | undefined;
89
+
90
+ declare namespace NodeJS {
91
+ interface CallSite {
92
+ getColumnNumber(): number | null;
93
+ getEnclosingColumnNumber(): number | null;
94
+ getEnclosingLineNumber(): number | null;
95
+ getEvalOrigin(): string | undefined;
96
+ getFileName(): string | null;
97
+ getFunction(): Function | undefined;
98
+ getFunctionName(): string | null;
99
+ getLineNumber(): number | null;
100
+ getMethodName(): string | null;
101
+ getPosition(): number;
102
+ getPromiseIndex(): number | null;
103
+ getScriptHash(): string;
104
+ getScriptNameOrSourceURL(): string | null;
105
+ getThis(): unknown;
106
+ getTypeName(): string | null;
107
+ isAsync(): boolean;
108
+ isConstructor(): boolean;
109
+ isEval(): boolean;
110
+ isNative(): boolean;
111
+ isPromiseAll(): boolean;
112
+ isToplevel(): boolean;
262
113
  }
263
114
 
264
- // Global DOM types
265
-
266
- interface DOMException extends _DOMException {}
267
- var DOMException: typeof globalThis extends { onmessage: any; DOMException: infer T } ? T
268
- : NodeDOMExceptionConstructor;
269
-
270
- // #region AbortController
271
- interface AbortController {
272
- readonly signal: AbortSignal;
273
- abort(reason?: any): void;
115
+ interface ErrnoException extends Error {
116
+ errno?: number | undefined;
117
+ code?: string | undefined;
118
+ path?: string | undefined;
119
+ syscall?: string | undefined;
274
120
  }
275
- var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
276
- : {
277
- prototype: AbortController;
278
- new(): AbortController;
279
- };
280
121
 
281
- interface AbortSignal extends EventTarget {
282
- readonly aborted: boolean;
283
- onabort: ((this: AbortSignal, ev: Event) => any) | null;
284
- readonly reason: any;
285
- throwIfAborted(): void;
122
+ interface RefCounted {
123
+ ref(): this;
124
+ unref(): this;
286
125
  }
287
- var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
288
- : {
289
- prototype: AbortSignal;
290
- new(): AbortSignal;
291
- abort(reason?: any): AbortSignal;
292
- any(signals: AbortSignal[]): AbortSignal;
293
- timeout(milliseconds: number): AbortSignal;
294
- };
295
- // #endregion AbortController
296
-
297
- // #region Storage
298
- interface Storage extends _Storage {}
299
- // Conditional on `onabort` rather than `onmessage`, in order to exclude lib.webworker
300
- var Storage: typeof globalThis extends { onabort: any; Storage: infer T } ? T
301
- : {
302
- prototype: Storage;
303
- new(): Storage;
304
- };
305
-
306
- var localStorage: Storage;
307
- var sessionStorage: Storage;
308
- // #endregion Storage
309
126
 
310
- // #region fetch
311
- interface RequestInit extends _RequestInit {}
312
-
313
- function fetch(
314
- input: string | URL | globalThis.Request,
315
- init?: RequestInit,
316
- ): Promise<Response>;
317
-
318
- interface Request extends _Request {}
319
- var Request: typeof globalThis extends {
320
- onmessage: any;
321
- Request: infer T;
322
- } ? T
323
- : typeof import('./undici-types').Request;
127
+ interface Dict<T> {
128
+ [key: string]: T | undefined;
129
+ }
324
130
 
325
- interface ResponseInit extends _ResponseInit {}
131
+ interface ReadOnlyDict<T> {
132
+ readonly [key: string]: T | undefined;
133
+ }
326
134
 
327
- interface Response extends _Response {}
328
- var Response: typeof globalThis extends {
329
- onmessage: any;
330
- Response: infer T;
331
- } ? T
332
- : typeof import('./undici-types').Response;
135
+ type PartialOptions<T> = { [K in keyof T]?: T[K] | undefined };
333
136
 
334
- interface FormData extends _FormData {}
335
- var FormData: typeof globalThis extends {
336
- onmessage: any;
337
- FormData: infer T;
338
- } ? T
339
- : typeof import('./undici-types').FormData;
137
+ interface GCFunction {
138
+ (minor?: boolean): void;
139
+ (options: NodeJS.GCOptions & { execution: "async" }): Promise<void>;
140
+ (options: NodeJS.GCOptions): void;
141
+ }
340
142
 
341
- interface Headers extends _Headers {}
342
- var Headers: typeof globalThis extends {
343
- onmessage: any;
344
- Headers: infer T;
345
- } ? T
346
- : typeof import('./undici-types').Headers;
143
+ interface GCOptions {
144
+ execution?: "sync" | "async" | undefined;
145
+ flavor?: "regular" | "last-resort" | undefined;
146
+ type?: "major-snapshot" | "major" | "minor" | undefined;
147
+ filename?: string | undefined;
148
+ }
347
149
 
348
- interface MessageEvent extends _MessageEvent {}
349
- var MessageEvent: typeof globalThis extends {
350
- onmessage: any;
351
- MessageEvent: infer T;
352
- } ? T
353
- : typeof import('./undici-types').MessageEvent;
150
+ /** An iterable iterator returned by the Node.js API. */
151
+ interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
152
+ [Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;
153
+ }
354
154
 
355
- interface WebSocket extends _WebSocket {}
356
- var WebSocket: typeof globalThis extends { onmessage: any; WebSocket: infer T } ? T
357
- : typeof import('./undici-types').WebSocket;
155
+ /** An async iterable iterator returned by the Node.js API. */
156
+ interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
157
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
158
+ }
358
159
 
359
- interface EventSource extends _EventSource {}
360
- var EventSource: typeof globalThis extends { onmessage: any; EventSource: infer T } ? T
361
- : typeof import('./undici-types').EventSource;
160
+ /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */
161
+ type BufferSource = NonSharedArrayBufferView | ArrayBuffer;
362
162
 
363
- interface CloseEvent extends _CloseEvent {}
364
- var CloseEvent: typeof globalThis extends { onmessage: any; CloseEvent: infer T } ? T
365
- : typeof import('./undici-types').CloseEvent;
366
- // #endregion fetch
163
+ /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */
164
+ type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike;
367
165
  }
368
166
 
@@ -1,3 +1,18 @@
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
5
+
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
14
+
15
+
1
16
  export {}; // Make this a module
2
17
 
3
18
  declare global {
@@ -18,6 +33,85 @@ declare global {
18
33
  type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
19
34
  | TypedArray<TArrayBuffer>
20
35
  | DataView<TArrayBuffer>;
36
+
37
+ // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node
38
+ // while maintaining compatibility with TS <=5.6.
39
+ // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types.
40
+ /**
41
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
42
+ * TypeScript versions earlier than 5.7.
43
+ */
44
+ type NonSharedUint8Array = Uint8Array<ArrayBuffer>;
45
+ /**
46
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
47
+ * TypeScript versions earlier than 5.7.
48
+ */
49
+ type NonSharedUint8ClampedArray = Uint8ClampedArray<ArrayBuffer>;
50
+ /**
51
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
52
+ * TypeScript versions earlier than 5.7.
53
+ */
54
+ type NonSharedUint16Array = Uint16Array<ArrayBuffer>;
55
+ /**
56
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
57
+ * TypeScript versions earlier than 5.7.
58
+ */
59
+ type NonSharedUint32Array = Uint32Array<ArrayBuffer>;
60
+ /**
61
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
62
+ * TypeScript versions earlier than 5.7.
63
+ */
64
+ type NonSharedInt8Array = Int8Array<ArrayBuffer>;
65
+ /**
66
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
67
+ * TypeScript versions earlier than 5.7.
68
+ */
69
+ type NonSharedInt16Array = Int16Array<ArrayBuffer>;
70
+ /**
71
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
72
+ * TypeScript versions earlier than 5.7.
73
+ */
74
+ type NonSharedInt32Array = Int32Array<ArrayBuffer>;
75
+ /**
76
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
77
+ * TypeScript versions earlier than 5.7.
78
+ */
79
+ type NonSharedBigUint64Array = BigUint64Array<ArrayBuffer>;
80
+ /**
81
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
82
+ * TypeScript versions earlier than 5.7.
83
+ */
84
+ type NonSharedBigInt64Array = BigInt64Array<ArrayBuffer>;
85
+ /**
86
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
87
+ * TypeScript versions earlier than 5.7.
88
+ */
89
+ type NonSharedFloat16Array = Float16Array<ArrayBuffer>;
90
+ /**
91
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
92
+ * TypeScript versions earlier than 5.7.
93
+ */
94
+ type NonSharedFloat32Array = Float32Array<ArrayBuffer>;
95
+ /**
96
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
97
+ * TypeScript versions earlier than 5.7.
98
+ */
99
+ type NonSharedFloat64Array = Float64Array<ArrayBuffer>;
100
+ /**
101
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
102
+ * TypeScript versions earlier than 5.7.
103
+ */
104
+ type NonSharedDataView = DataView<ArrayBuffer>;
105
+ /**
106
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
107
+ * TypeScript versions earlier than 5.7.
108
+ */
109
+ type NonSharedTypedArray = TypedArray<ArrayBuffer>;
110
+ /**
111
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
112
+ * TypeScript versions earlier than 5.7.
113
+ */
114
+ type NonSharedArrayBufferView = ArrayBufferView<ArrayBuffer>;
21
115
  }
22
116
  }
23
117