@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.
- package/README.md +1 -1
- package/assert/strict.d.ts +113 -1
- package/assert.d.ts +162 -248
- package/async_hooks.d.ts +20 -5
- package/buffer.buffer.d.ts +24 -6
- package/buffer.d.ts +63 -168
- package/child_process.d.ts +117 -223
- package/cluster.d.ts +251 -329
- package/compatibility/iterators.d.ts +15 -0
- package/console.d.ts +60 -346
- package/constants.d.ts +15 -1
- package/crypto.d.ts +713 -1149
- package/dgram.d.ts +30 -50
- package/diagnostics_channel.d.ts +16 -3
- package/dns/promises.d.ts +15 -0
- package/dns.d.ts +150 -131
- package/domain.d.ts +25 -14
- package/events.d.ts +858 -719
- package/fs/promises.d.ts +117 -53
- package/fs.d.ts +729 -484
- package/globals.d.ts +142 -344
- package/globals.typedarray.d.ts +94 -0
- package/http.d.ts +358 -246
- package/http2.d.ts +578 -711
- package/https.d.ts +85 -216
- package/index.d.ts +39 -3
- package/inspector/promises.d.ts +54 -0
- package/inspector.d.ts +180 -3936
- package/inspector.generated.d.ts +4242 -0
- package/module.d.ts +60 -95
- package/my-shim.d.ts +15 -0
- package/net.d.ts +102 -186
- package/os.d.ts +32 -6
- package/package.json +3 -8
- package/path/posix.d.ts +20 -0
- package/path/win32.d.ts +20 -0
- package/path.d.ts +132 -122
- package/perf_hooks.d.ts +310 -644
- package/process.d.ts +192 -138
- package/punycode.d.ts +17 -2
- package/querystring.d.ts +16 -1
- package/quic.d.ts +926 -0
- package/readline/promises.d.ts +16 -1
- package/readline.d.ts +80 -118
- package/repl.d.ts +98 -96
- package/sea.d.ts +25 -1
- package/sqlite.d.ts +277 -13
- package/stream/consumers.d.ts +22 -7
- package/stream/promises.d.ts +148 -12
- package/stream/web.d.ts +187 -494
- package/stream.d.ts +608 -490
- package/string_decoder.d.ts +18 -3
- package/test/reporters.d.ts +112 -0
- package/test.d.ts +238 -199
- package/timers/promises.d.ts +16 -1
- package/timers.d.ts +16 -129
- package/tls.d.ts +163 -163
- package/trace_events.d.ts +21 -6
- package/ts5.6/buffer.buffer.d.ts +25 -8
- package/ts5.6/compatibility/float16array.d.ts +15 -0
- package/ts5.6/globals.typedarray.d.ts +31 -0
- package/ts5.6/index.d.ts +39 -3
- package/ts5.7/compatibility/float16array.d.ts +15 -0
- package/ts5.7/index.d.ts +39 -3
- package/tty.d.ts +70 -13
- package/undici-types/agent.d.ts +20 -4
- package/undici-types/api.d.ts +15 -0
- package/undici-types/balanced-pool.d.ts +15 -0
- package/undici-types/cache-interceptor.d.ts +15 -0
- package/undici-types/cache.d.ts +15 -0
- package/undici-types/client-stats.d.ts +31 -0
- package/undici-types/client.d.ts +21 -5
- package/undici-types/connector.d.ts +15 -0
- package/undici-types/content-type.d.ts +15 -0
- package/undici-types/cookies.d.ts +15 -0
- package/undici-types/diagnostics-channel.d.ts +24 -1
- package/undici-types/dispatcher.d.ts +18 -8
- package/undici-types/env-http-proxy-agent.d.ts +17 -1
- package/undici-types/errors.d.ts +20 -15
- package/undici-types/eventsource.d.ts +24 -4
- package/undici-types/fetch.d.ts +16 -0
- package/undici-types/formdata.d.ts +15 -0
- package/undici-types/global-dispatcher.d.ts +15 -0
- package/undici-types/global-origin.d.ts +15 -0
- package/undici-types/h2c-client.d.ts +15 -2
- package/undici-types/handlers.d.ts +16 -1
- package/undici-types/header.d.ts +15 -0
- package/undici-types/index.d.ts +21 -1
- package/undici-types/interceptors.d.ts +20 -0
- package/undici-types/mock-agent.d.ts +18 -0
- package/undici-types/mock-call-history.d.ts +15 -0
- package/undici-types/mock-client.d.ts +17 -0
- package/undici-types/mock-errors.d.ts +15 -0
- package/undici-types/mock-interceptor.d.ts +17 -1
- package/undici-types/mock-pool.d.ts +17 -0
- package/undici-types/package.json +1 -1
- package/undici-types/patch.d.ts +15 -0
- package/undici-types/pool-stats.d.ts +15 -0
- package/undici-types/pool.d.ts +17 -0
- package/undici-types/proxy-agent.d.ts +16 -0
- package/undici-types/readable.d.ts +15 -0
- package/undici-types/retry-agent.d.ts +15 -0
- package/undici-types/retry-handler.d.ts +24 -0
- package/undici-types/snapshot-agent.d.ts +125 -0
- package/undici-types/util.d.ts +15 -0
- package/undici-types/utility.d.ts +15 -0
- package/undici-types/webidl.d.ts +126 -36
- package/undici-types/websocket.d.ts +18 -1
- package/url.d.ts +107 -587
- package/util/types.d.ts +571 -0
- package/util.d.ts +158 -792
- package/v8.d.ts +82 -7
- package/vm.d.ts +267 -108
- package/wasi.d.ts +38 -2
- package/web-globals/abortcontroller.d.ts +75 -0
- package/web-globals/blob.d.ts +39 -0
- package/web-globals/console.d.ts +25 -0
- package/web-globals/crypto.d.ts +55 -0
- package/web-globals/domexception.d.ts +84 -0
- package/web-globals/encoding.d.ts +27 -0
- package/{dom-events.d.ts → web-globals/events.d.ts} +72 -50
- package/web-globals/fetch.d.ts +70 -0
- package/web-globals/importmeta.d.ts +29 -0
- package/web-globals/messaging.d.ts +39 -0
- package/web-globals/navigator.d.ts +41 -0
- package/web-globals/performance.d.ts +61 -0
- package/web-globals/storage.d.ts +40 -0
- package/web-globals/streams.d.ts +131 -0
- package/web-globals/timers.d.ts +60 -0
- package/web-globals/url.d.ts +40 -0
- package/worker_threads.d.ts +306 -349
- package/zlib.d.ts +59 -94
- package/ts5.1/compatibility/disposable.d.ts +0 -13
- package/ts5.1/index.d.ts +0 -100
package/module.d.ts
CHANGED
|
@@ -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
|
/**
|
|
2
17
|
* @since v0.3.7
|
|
3
18
|
*/
|
|
@@ -31,7 +46,7 @@ declare module "node:module" {
|
|
|
31
46
|
/**
|
|
32
47
|
* The following constants are returned as the `status` field in the object returned by
|
|
33
48
|
* {@link enableCompileCache} to indicate the result of the attempt to enable the
|
|
34
|
-
* [module compile cache](https://nodejs.org/docs/latest-
|
|
49
|
+
* [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
|
|
35
50
|
* @since v22.8.0
|
|
36
51
|
*/
|
|
37
52
|
namespace compileCacheStatus {
|
|
@@ -63,6 +78,24 @@ declare module "node:module" {
|
|
|
63
78
|
const DISABLED: number;
|
|
64
79
|
}
|
|
65
80
|
}
|
|
81
|
+
interface EnableCompileCacheOptions {
|
|
82
|
+
/**
|
|
83
|
+
* Optional. Directory to store the compile cache. If not specified,
|
|
84
|
+
* the directory specified by the `NODE_COMPILE_CACHE=dir` environment variable
|
|
85
|
+
* will be used if it's set, or `path.join(os.tmpdir(), 'node-compile-cache')`
|
|
86
|
+
* otherwise.
|
|
87
|
+
* @since v25.0.0
|
|
88
|
+
*/
|
|
89
|
+
directory?: string | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Optional. If `true`, enables portable compile cache so that
|
|
92
|
+
* the cache can be reused even if the project directory is moved. This is a best-effort
|
|
93
|
+
* feature. If not specified, it will depend on whether the environment variable
|
|
94
|
+
* `NODE_COMPILE_CACHE_PORTABLE=1` is set.
|
|
95
|
+
* @since v25.0.0
|
|
96
|
+
*/
|
|
97
|
+
portable?: boolean | undefined;
|
|
98
|
+
}
|
|
66
99
|
interface EnableCompileCacheResult {
|
|
67
100
|
/**
|
|
68
101
|
* One of the {@link constants.compileCacheStatus}
|
|
@@ -82,25 +115,21 @@ declare module "node:module" {
|
|
|
82
115
|
directory?: string;
|
|
83
116
|
}
|
|
84
117
|
/**
|
|
85
|
-
* Enable [module compile cache](https://nodejs.org/docs/latest-
|
|
118
|
+
* Enable [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
|
|
86
119
|
* in the current Node.js instance.
|
|
87
120
|
*
|
|
88
|
-
*
|
|
89
|
-
* `
|
|
90
|
-
* `
|
|
91
|
-
* recommended to call `module.enableCompileCache()` without specifying the `cacheDir`,
|
|
92
|
-
* so that the directory can be overridden by the `NODE_COMPILE_CACHE` environment
|
|
93
|
-
* variable when necessary.
|
|
121
|
+
* For general use cases, it's recommended to call `module.enableCompileCache()` without
|
|
122
|
+
* specifying the `options.directory`, so that the directory can be overridden by the
|
|
123
|
+
* `NODE_COMPILE_CACHE` environment variable when necessary.
|
|
94
124
|
*
|
|
95
|
-
* Since compile cache is supposed to be a
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
* field in the returned object would be one of the `module.constants.compileCacheStatus`
|
|
125
|
+
* Since compile cache is supposed to be a optimization that is not mission critical, this
|
|
126
|
+
* method is designed to not throw any exception when the compile cache cannot be enabled.
|
|
127
|
+
* Instead, it will return an object containing an error message in the `message` field to
|
|
128
|
+
* aid debugging. If compile cache is enabled successfully, the `directory` field in the
|
|
129
|
+
* returned object contains the path to the directory where the compile cache is stored. The
|
|
130
|
+
* `status` field in the returned object would be one of the `module.constants.compileCacheStatus`
|
|
102
131
|
* values to indicate the result of the attempt to enable the
|
|
103
|
-
* [module compile cache](https://nodejs.org/docs/latest-
|
|
132
|
+
* [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache).
|
|
104
133
|
*
|
|
105
134
|
* This method only affects the current Node.js instance. To enable it in child worker threads,
|
|
106
135
|
* either call this method in child worker threads too, or set the
|
|
@@ -108,12 +137,11 @@ declare module "node:module" {
|
|
|
108
137
|
* be inherited into the child workers. The directory can be obtained either from the
|
|
109
138
|
* `directory` field returned by this method, or with {@link getCompileCacheDir}.
|
|
110
139
|
* @since v22.8.0
|
|
111
|
-
* @param
|
|
112
|
-
* will be stored/retrieved.
|
|
140
|
+
* @param options Optional. If a string is passed, it is considered to be `options.directory`.
|
|
113
141
|
*/
|
|
114
|
-
function enableCompileCache(
|
|
142
|
+
function enableCompileCache(options?: string | EnableCompileCacheOptions): EnableCompileCacheResult;
|
|
115
143
|
/**
|
|
116
|
-
* Flush the [module compile cache](https://nodejs.org/docs/latest-
|
|
144
|
+
* Flush the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
|
|
117
145
|
* accumulated from modules already loaded
|
|
118
146
|
* in the current Node.js instance to disk. This returns after all the flushing
|
|
119
147
|
* file system operations come to an end, no matter they succeed or not. If there
|
|
@@ -124,7 +152,7 @@ declare module "node:module" {
|
|
|
124
152
|
function flushCompileCache(): void;
|
|
125
153
|
/**
|
|
126
154
|
* @since v22.8.0
|
|
127
|
-
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-
|
|
155
|
+
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v25.x/api/module.html#module-compile-cache)
|
|
128
156
|
* directory if it is enabled, or `undefined` otherwise.
|
|
129
157
|
*/
|
|
130
158
|
function getCompileCacheDir(): string | undefined;
|
|
@@ -195,7 +223,7 @@ declare module "node:module" {
|
|
|
195
223
|
*/
|
|
196
224
|
data?: Data | undefined;
|
|
197
225
|
/**
|
|
198
|
-
* [Transferable objects](https://nodejs.org/docs/latest-
|
|
226
|
+
* [Transferable objects](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html#portpostmessagevalue-transferlist)
|
|
199
227
|
* to be passed into the `initialize` hook.
|
|
200
228
|
*/
|
|
201
229
|
transferList?: any[] | undefined;
|
|
@@ -204,10 +232,10 @@ declare module "node:module" {
|
|
|
204
232
|
/**
|
|
205
233
|
* Register a module that exports hooks that customize Node.js module
|
|
206
234
|
* resolution and loading behavior. See
|
|
207
|
-
* [Customization hooks](https://nodejs.org/docs/latest-
|
|
235
|
+
* [Customization hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks).
|
|
208
236
|
*
|
|
209
237
|
* This feature requires `--allow-worker` if used with the
|
|
210
|
-
* [Permission Model](https://nodejs.org/docs/latest-
|
|
238
|
+
* [Permission Model](https://nodejs.org/docs/latest-v25.x/api/permissions.html#permission-model).
|
|
211
239
|
* @since v20.6.0, v18.19.0
|
|
212
240
|
* @param specifier Customization hooks to be registered; this should be
|
|
213
241
|
* the same string that would be passed to `import()`, except that if it is
|
|
@@ -223,12 +251,12 @@ declare module "node:module" {
|
|
|
223
251
|
function register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
|
|
224
252
|
interface RegisterHooksOptions {
|
|
225
253
|
/**
|
|
226
|
-
* See [load hook](https://nodejs.org/docs/latest-
|
|
254
|
+
* See [load hook](https://nodejs.org/docs/latest-v25.x/api/module.html#loadurl-context-nextload).
|
|
227
255
|
* @default undefined
|
|
228
256
|
*/
|
|
229
257
|
load?: LoadHookSync | undefined;
|
|
230
258
|
/**
|
|
231
|
-
* See [resolve hook](https://nodejs.org/docs/latest-
|
|
259
|
+
* See [resolve hook](https://nodejs.org/docs/latest-v25.x/api/module.html#resolvespecifier-context-nextresolve).
|
|
232
260
|
* @default undefined
|
|
233
261
|
*/
|
|
234
262
|
resolve?: ResolveHookSync | undefined;
|
|
@@ -240,7 +268,7 @@ declare module "node:module" {
|
|
|
240
268
|
deregister(): void;
|
|
241
269
|
}
|
|
242
270
|
/**
|
|
243
|
-
* Register [hooks](https://nodejs.org/docs/latest-
|
|
271
|
+
* Register [hooks](https://nodejs.org/docs/latest-v25.x/api/module.html#customization-hooks)
|
|
244
272
|
* that customize Node.js module resolution and loading behavior.
|
|
245
273
|
* @since v22.15.0
|
|
246
274
|
* @experimental
|
|
@@ -271,9 +299,9 @@ declare module "node:module" {
|
|
|
271
299
|
* with `vm.runInContext()` or `vm.compileFunction()`.
|
|
272
300
|
* By default, it will throw an error if the code contains TypeScript features
|
|
273
301
|
* that require transformation such as `Enums`,
|
|
274
|
-
* see [type-stripping](https://nodejs.org/docs/latest-
|
|
302
|
+
* see [type-stripping](https://nodejs.org/docs/latest-v25.x/api/typescript.md#type-stripping) for more information.
|
|
275
303
|
* When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
|
|
276
|
-
* see [transform TypeScript features](https://nodejs.org/docs/latest-
|
|
304
|
+
* see [transform TypeScript features](https://nodejs.org/docs/latest-v25.x/api/typescript.md#typescript-features) for more information.
|
|
277
305
|
* When mode is `'strip'`, source maps are not generated, because locations are preserved.
|
|
278
306
|
* If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.
|
|
279
307
|
*
|
|
@@ -360,6 +388,7 @@ declare module "node:module" {
|
|
|
360
388
|
interface ImportAttributes extends NodeJS.Dict<string> {
|
|
361
389
|
type?: string | undefined;
|
|
362
390
|
}
|
|
391
|
+
type ImportPhase = "source" | "evaluation";
|
|
363
392
|
type ModuleFormat =
|
|
364
393
|
| "addon"
|
|
365
394
|
| "builtin"
|
|
@@ -623,70 +652,6 @@ declare module "node:module" {
|
|
|
623
652
|
function wrap(script: string): string;
|
|
624
653
|
}
|
|
625
654
|
global {
|
|
626
|
-
interface ImportMeta {
|
|
627
|
-
/**
|
|
628
|
-
* The directory name of the current module.
|
|
629
|
-
*
|
|
630
|
-
* This is the same as the `path.dirname()` of the `import.meta.filename`.
|
|
631
|
-
*
|
|
632
|
-
* > **Caveat**: only present on `file:` modules.
|
|
633
|
-
* @since v21.2.0, v20.11.0
|
|
634
|
-
*/
|
|
635
|
-
dirname: string;
|
|
636
|
-
/**
|
|
637
|
-
* The full absolute path and filename of the current module, with
|
|
638
|
-
* symlinks resolved.
|
|
639
|
-
*
|
|
640
|
-
* This is the same as the `url.fileURLToPath()` of the `import.meta.url`.
|
|
641
|
-
*
|
|
642
|
-
* > **Caveat** only local modules support this property. Modules not using the
|
|
643
|
-
* > `file:` protocol will not provide it.
|
|
644
|
-
* @since v21.2.0, v20.11.0
|
|
645
|
-
*/
|
|
646
|
-
filename: string;
|
|
647
|
-
/**
|
|
648
|
-
* The absolute `file:` URL of the module.
|
|
649
|
-
*
|
|
650
|
-
* This is defined exactly the same as it is in browsers providing the URL of the
|
|
651
|
-
* current module file.
|
|
652
|
-
*
|
|
653
|
-
* This enables useful patterns such as relative file loading:
|
|
654
|
-
*
|
|
655
|
-
* ```js
|
|
656
|
-
* import { readFileSync } from 'node:fs';
|
|
657
|
-
* const buffer = readFileSync(new URL('./data.proto', import.meta.url));
|
|
658
|
-
* ```
|
|
659
|
-
*/
|
|
660
|
-
url: string;
|
|
661
|
-
/**
|
|
662
|
-
* `import.meta.resolve` is a module-relative resolution function scoped to
|
|
663
|
-
* each module, returning the URL string.
|
|
664
|
-
*
|
|
665
|
-
* ```js
|
|
666
|
-
* const dependencyAsset = import.meta.resolve('component-lib/asset.css');
|
|
667
|
-
* // file:///app/node_modules/component-lib/asset.css
|
|
668
|
-
* import.meta.resolve('./dep.js');
|
|
669
|
-
* // file:///app/dep.js
|
|
670
|
-
* ```
|
|
671
|
-
*
|
|
672
|
-
* All features of the Node.js module resolution are supported. Dependency
|
|
673
|
-
* resolutions are subject to the permitted exports resolutions within the package.
|
|
674
|
-
*
|
|
675
|
-
* **Caveats**:
|
|
676
|
-
*
|
|
677
|
-
* * This can result in synchronous file-system operations, which
|
|
678
|
-
* can impact performance similarly to `require.resolve`.
|
|
679
|
-
* * This feature is not available within custom loaders (it would
|
|
680
|
-
* create a deadlock).
|
|
681
|
-
* @since v13.9.0, v12.16.0
|
|
682
|
-
* @param specifier The module specifier to resolve relative to the
|
|
683
|
-
* current module.
|
|
684
|
-
* @param parent An optional absolute parent module URL to resolve from.
|
|
685
|
-
* **Default:** `import.meta.url`
|
|
686
|
-
* @returns The absolute URL string that the specifier would resolve to.
|
|
687
|
-
*/
|
|
688
|
-
resolve(specifier: string, parent?: string | URL): string;
|
|
689
|
-
}
|
|
690
655
|
namespace NodeJS {
|
|
691
656
|
interface Module {
|
|
692
657
|
/**
|
|
@@ -760,7 +725,7 @@ declare module "node:module" {
|
|
|
760
725
|
* Modules are cached in this object when they are required. By deleting a key
|
|
761
726
|
* value from this object, the next `require` will reload the module.
|
|
762
727
|
* This does not apply to
|
|
763
|
-
* [native addons](https://nodejs.org/docs/latest-
|
|
728
|
+
* [native addons](https://nodejs.org/docs/latest-v25.x/api/addons.html),
|
|
764
729
|
* for which reloading will result in an error.
|
|
765
730
|
* @since v0.3.0
|
|
766
731
|
*/
|
|
@@ -794,7 +759,7 @@ declare module "node:module" {
|
|
|
794
759
|
* Paths to resolve module location from. If present, these
|
|
795
760
|
* paths are used instead of the default resolution paths, with the exception
|
|
796
761
|
* of
|
|
797
|
-
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-
|
|
762
|
+
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v25.x/api/modules.html#loading-from-the-global-folders)
|
|
798
763
|
* like `$HOME/.node_modules`, which are
|
|
799
764
|
* always included. Each of these paths is used as a starting point for
|
|
800
765
|
* the module resolution algorithm, meaning that the `node_modules` hierarchy
|
package/my-shim.d.ts
CHANGED
|
@@ -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
|
declare module "assert";
|
|
2
17
|
declare module "assert/strict";
|
|
3
18
|
declare module "async_hooks";
|