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

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 (113) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +16 -0
  3. package/assert/strict.d.ts +5 -0
  4. package/assert.d.ts +1053 -0
  5. package/async_hooks.d.ts +621 -0
  6. package/buffer.buffer.d.ts +464 -0
  7. package/buffer.d.ts +1928 -0
  8. package/child_process.d.ts +1547 -0
  9. package/cluster.d.ts +576 -0
  10. package/compatibility/iterators.d.ts +22 -0
  11. package/console.d.ts +449 -0
  12. package/constants.d.ts +18 -0
  13. package/crypto.d.ts +4514 -0
  14. package/dgram.d.ts +597 -0
  15. package/diagnostics_channel.d.ts +576 -0
  16. package/dns/promises.d.ts +501 -0
  17. package/dns.d.ts +916 -0
  18. package/dom-events.d.ts +100 -0
  19. package/domain.d.ts +168 -0
  20. package/events.d.ts +927 -0
  21. package/fs/promises.d.ts +1278 -0
  22. package/fs.d.ts +4444 -0
  23. package/globals.d.ts +368 -0
  24. package/globals.typedarray.d.ts +23 -0
  25. package/http.d.ts +2044 -0
  26. package/http2.d.ts +2626 -0
  27. package/https.d.ts +543 -0
  28. package/index.d.ts +96 -0
  29. package/inspector.d.ts +3993 -0
  30. package/module.d.ts +866 -0
  31. package/my-shim.d.ts +57 -0
  32. package/net.d.ts +1030 -0
  33. package/os.d.ts +494 -0
  34. package/package.json +158 -0
  35. package/path.d.ts +189 -0
  36. package/perf_hooks.d.ts +968 -0
  37. package/process.d.ts +2016 -0
  38. package/punycode.d.ts +115 -0
  39. package/querystring.d.ts +150 -0
  40. package/readline/promises.d.ts +159 -0
  41. package/readline.d.ts +592 -0
  42. package/repl.d.ts +426 -0
  43. package/sea.d.ts +154 -0
  44. package/sqlite.d.ts +689 -0
  45. package/stream/consumers.d.ts +36 -0
  46. package/stream/promises.d.ts +88 -0
  47. package/stream/web.d.ts +616 -0
  48. package/stream.d.ts +1654 -0
  49. package/string_decoder.d.ts +65 -0
  50. package/test.d.ts +2216 -0
  51. package/timers/promises.d.ts +106 -0
  52. package/timers.d.ts +285 -0
  53. package/tls.d.ts +1211 -0
  54. package/trace_events.d.ts +195 -0
  55. package/ts5.1/compatibility/disposable.d.ts +13 -0
  56. package/ts5.1/index.d.ts +100 -0
  57. package/ts5.6/buffer.buffer.d.ts +461 -0
  58. package/ts5.6/compatibility/float16array.d.ts +72 -0
  59. package/ts5.6/globals.typedarray.d.ts +21 -0
  60. package/ts5.6/index.d.ts +98 -0
  61. package/ts5.7/compatibility/float16array.d.ts +73 -0
  62. package/ts5.7/index.d.ts +98 -0
  63. package/tty.d.ts +206 -0
  64. package/undici-types/LICENSE +22 -0
  65. package/undici-types/README.md +7 -0
  66. package/undici-types/agent.d.ts +32 -0
  67. package/undici-types/api.d.ts +44 -0
  68. package/undici-types/balanced-pool.d.ts +30 -0
  69. package/undici-types/cache-interceptor.d.ts +173 -0
  70. package/undici-types/cache.d.ts +37 -0
  71. package/undici-types/client.d.ts +108 -0
  72. package/undici-types/connector.d.ts +35 -0
  73. package/undici-types/content-type.d.ts +22 -0
  74. package/undici-types/cookies.d.ts +31 -0
  75. package/undici-types/diagnostics-channel.d.ts +67 -0
  76. package/undici-types/dispatcher.d.ts +282 -0
  77. package/undici-types/env-http-proxy-agent.d.ts +22 -0
  78. package/undici-types/errors.d.ts +172 -0
  79. package/undici-types/eventsource.d.ts +62 -0
  80. package/undici-types/fetch.d.ts +211 -0
  81. package/undici-types/formdata.d.ts +109 -0
  82. package/undici-types/global-dispatcher.d.ts +10 -0
  83. package/undici-types/global-origin.d.ts +8 -0
  84. package/undici-types/h2c-client.d.ts +76 -0
  85. package/undici-types/handlers.d.ts +16 -0
  86. package/undici-types/header.d.ts +161 -0
  87. package/undici-types/index.d.ts +76 -0
  88. package/undici-types/interceptors.d.ts +35 -0
  89. package/undici-types/mock-agent.d.ts +66 -0
  90. package/undici-types/mock-call-history.d.ts +112 -0
  91. package/undici-types/mock-client.d.ts +26 -0
  92. package/undici-types/mock-errors.d.ts +13 -0
  93. package/undici-types/mock-interceptor.d.ts +94 -0
  94. package/undici-types/mock-pool.d.ts +26 -0
  95. package/undici-types/package.json +55 -0
  96. package/undici-types/patch.d.ts +30 -0
  97. package/undici-types/pool-stats.d.ts +20 -0
  98. package/undici-types/pool.d.ts +40 -0
  99. package/undici-types/proxy-agent.d.ts +29 -0
  100. package/undici-types/readable.d.ts +69 -0
  101. package/undici-types/retry-agent.d.ts +9 -0
  102. package/undici-types/retry-handler.d.ts +117 -0
  103. package/undici-types/util.d.ts +19 -0
  104. package/undici-types/utility.d.ts +8 -0
  105. package/undici-types/webidl.d.ts +267 -0
  106. package/undici-types/websocket.d.ts +185 -0
  107. package/url.d.ts +1012 -0
  108. package/util.d.ts +2300 -0
  109. package/v8.d.ts +917 -0
  110. package/vm.d.ts +1034 -0
  111. package/wasi.d.ts +179 -0
  112. package/worker_threads.d.ts +773 -0
  113. package/zlib.d.ts +666 -0
@@ -0,0 +1,100 @@
1
+ // Make this a module
2
+ export {};
3
+
4
+ // Conditional type aliases, which are later merged into the global scope.
5
+ // Will either be empty if the relevant web library is already present, or the @types/node definition otherwise.
6
+
7
+ type __Event = typeof globalThis extends { onmessage: any } ? {} : Event;
8
+ interface Event {
9
+ readonly bubbles: boolean;
10
+ cancelBubble: boolean;
11
+ readonly cancelable: boolean;
12
+ readonly composed: boolean;
13
+ composedPath(): [EventTarget?];
14
+ readonly currentTarget: EventTarget | null;
15
+ readonly defaultPrevented: boolean;
16
+ readonly eventPhase: 0 | 2;
17
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
18
+ readonly isTrusted: boolean;
19
+ preventDefault(): void;
20
+ readonly returnValue: boolean;
21
+ readonly srcElement: EventTarget | null;
22
+ stopImmediatePropagation(): void;
23
+ stopPropagation(): void;
24
+ readonly target: EventTarget | null;
25
+ readonly timeStamp: number;
26
+ readonly type: string;
27
+ }
28
+
29
+ type __CustomEvent<T = any> = typeof globalThis extends { onmessage: any } ? {} : CustomEvent<T>;
30
+ interface CustomEvent<T = any> extends Event {
31
+ readonly detail: T;
32
+ }
33
+
34
+ type __EventTarget = typeof globalThis extends { onmessage: any } ? {} : EventTarget;
35
+ interface EventTarget {
36
+ addEventListener(
37
+ type: string,
38
+ listener: EventListener | EventListenerObject,
39
+ options?: AddEventListenerOptions | boolean,
40
+ ): void;
41
+ dispatchEvent(event: Event): boolean;
42
+ removeEventListener(
43
+ type: string,
44
+ listener: EventListener | EventListenerObject,
45
+ options?: EventListenerOptions | boolean,
46
+ ): void;
47
+ }
48
+
49
+ interface EventInit {
50
+ bubbles?: boolean;
51
+ cancelable?: boolean;
52
+ composed?: boolean;
53
+ }
54
+
55
+ interface CustomEventInit<T = any> extends EventInit {
56
+ detail?: T;
57
+ }
58
+
59
+ interface EventListenerOptions {
60
+ capture?: boolean;
61
+ }
62
+
63
+ interface AddEventListenerOptions extends EventListenerOptions {
64
+ once?: boolean;
65
+ passive?: boolean;
66
+ signal?: AbortSignal;
67
+ }
68
+
69
+ interface EventListener {
70
+ (evt: Event): void;
71
+ }
72
+
73
+ interface EventListenerObject {
74
+ handleEvent(object: Event): void;
75
+ }
76
+
77
+ // Merge conditional interfaces into global scope, and conditionally declare global constructors.
78
+ declare global {
79
+ interface Event extends __Event {}
80
+ var Event: typeof globalThis extends { onmessage: any; Event: infer T } ? T
81
+ : {
82
+ prototype: Event;
83
+ new(type: string, eventInitDict?: EventInit): Event;
84
+ };
85
+
86
+ interface CustomEvent<T = any> extends __CustomEvent<T> {}
87
+ var CustomEvent: typeof globalThis extends { onmessage: any; CustomEvent: infer T } ? T
88
+ : {
89
+ prototype: CustomEvent;
90
+ new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
91
+ };
92
+
93
+ interface EventTarget extends __EventTarget {}
94
+ var EventTarget: typeof globalThis extends { onmessage: any; EventTarget: infer T } ? T
95
+ : {
96
+ prototype: EventTarget;
97
+ new(): EventTarget;
98
+ };
99
+ }
100
+
package/domain.d.ts ADDED
@@ -0,0 +1,168 @@
1
+ /**
2
+ * **This module is pending deprecation.** Once a replacement API has been
3
+ * finalized, this module will be fully deprecated. Most developers should
4
+ * **not** have cause to use this module. Users who absolutely must have
5
+ * the functionality that domains provide may rely on it for the time being
6
+ * but should expect to have to migrate to a different solution
7
+ * in the future.
8
+ *
9
+ * Domains provide a way to handle multiple different IO operations as a
10
+ * single group. If any of the event emitters or callbacks registered to a
11
+ * domain emit an `'error'` event, or throw an error, then the domain object
12
+ * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to
13
+ * exit immediately with an error code.
14
+ * @deprecated Since v1.4.2 - Deprecated
15
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/domain.js)
16
+ */
17
+
18
+ declare module "node:domain" {
19
+ import EventEmitter = require('node:events');
20
+ /**
21
+ * The `Domain` class encapsulates the functionality of routing errors and
22
+ * uncaught exceptions to the active `Domain` object.
23
+ *
24
+ * To handle the errors that it catches, listen to its `'error'` event.
25
+ */
26
+ class Domain extends EventEmitter {
27
+ /**
28
+ * An array of timers and event emitters that have been explicitly added
29
+ * to the domain.
30
+ */
31
+ members: Array<EventEmitter | NodeJS.Timer>;
32
+ /**
33
+ * The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly
34
+ * pushes the domain onto the domain
35
+ * stack managed by the domain module (see {@link exit} for details on the
36
+ * domain stack). The call to `enter()` delimits the beginning of a chain of
37
+ * asynchronous calls and I/O operations bound to a domain.
38
+ *
39
+ * Calling `enter()` changes only the active domain, and does not alter the domain
40
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
41
+ * single domain.
42
+ */
43
+ enter(): void;
44
+ /**
45
+ * The `exit()` method exits the current domain, popping it off the domain stack.
46
+ * Any time execution is going to switch to the context of a different chain of
47
+ * asynchronous calls, it's important to ensure that the current domain is exited.
48
+ * The call to `exit()` delimits either the end of or an interruption to the chain
49
+ * of asynchronous calls and I/O operations bound to a domain.
50
+ *
51
+ * If there are multiple, nested domains bound to the current execution context, `exit()` will exit any domains nested within this domain.
52
+ *
53
+ * Calling `exit()` changes only the active domain, and does not alter the domain
54
+ * itself. `enter()` and `exit()` can be called an arbitrary number of times on a
55
+ * single domain.
56
+ */
57
+ exit(): void;
58
+ /**
59
+ * Run the supplied function in the context of the domain, implicitly
60
+ * binding all event emitters, timers, and low-level requests that are
61
+ * created in that context. Optionally, arguments can be passed to
62
+ * the function.
63
+ *
64
+ * This is the most basic way to use a domain.
65
+ *
66
+ * ```js
67
+ * import domain from 'node:domain';
68
+ * import fs from 'node:fs';
69
+ * const d = domain.create();
70
+ * d.on('error', (er) => {
71
+ * console.error('Caught error!', er);
72
+ * });
73
+ * d.run(() => {
74
+ * process.nextTick(() => {
75
+ * setTimeout(() => { // Simulating some various async stuff
76
+ * fs.open('non-existent file', 'r', (er, fd) => {
77
+ * if (er) throw er;
78
+ * // proceed...
79
+ * });
80
+ * }, 100);
81
+ * });
82
+ * });
83
+ * ```
84
+ *
85
+ * In this example, the `d.on('error')` handler will be triggered, rather
86
+ * than crashing the program.
87
+ */
88
+ run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
89
+ /**
90
+ * Explicitly adds an emitter to the domain. If any event handlers called by
91
+ * the emitter throw an error, or if the emitter emits an `'error'` event, it
92
+ * will be routed to the domain's `'error'` event, just like with implicit
93
+ * binding.
94
+ *
95
+ * This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
96
+ * the domain `'error'` handler.
97
+ *
98
+ * If the Timer or `EventEmitter` was already bound to a domain, it is removed
99
+ * from that one, and bound to this one instead.
100
+ * @param emitter emitter or timer to be added to the domain
101
+ */
102
+ add(emitter: EventEmitter | NodeJS.Timer): void;
103
+ /**
104
+ * The opposite of {@link add}. Removes domain handling from the
105
+ * specified emitter.
106
+ * @param emitter emitter or timer to be removed from the domain
107
+ */
108
+ remove(emitter: EventEmitter | NodeJS.Timer): void;
109
+ /**
110
+ * The returned function will be a wrapper around the supplied callback
111
+ * function. When the returned function is called, any errors that are
112
+ * thrown will be routed to the domain's `'error'` event.
113
+ *
114
+ * ```js
115
+ * const d = domain.create();
116
+ *
117
+ * function readSomeFile(filename, cb) {
118
+ * fs.readFile(filename, 'utf8', d.bind((er, data) => {
119
+ * // If this throws, it will also be passed to the domain.
120
+ * return cb(er, data ? JSON.parse(data) : null);
121
+ * }));
122
+ * }
123
+ *
124
+ * d.on('error', (er) => {
125
+ * // An error occurred somewhere. If we throw it now, it will crash the program
126
+ * // with the normal line number and stack message.
127
+ * });
128
+ * ```
129
+ * @param callback The callback function
130
+ * @return The bound function
131
+ */
132
+ bind<T extends Function>(callback: T): T;
133
+ /**
134
+ * This method is almost identical to {@link bind}. However, in
135
+ * addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
136
+ *
137
+ * In this way, the common `if (err) return callback(err);` pattern can be replaced
138
+ * with a single error handler in a single place.
139
+ *
140
+ * ```js
141
+ * const d = domain.create();
142
+ *
143
+ * function readSomeFile(filename, cb) {
144
+ * fs.readFile(filename, 'utf8', d.intercept((data) => {
145
+ * // Note, the first argument is never passed to the
146
+ * // callback since it is assumed to be the 'Error' argument
147
+ * // and thus intercepted by the domain.
148
+ *
149
+ * // If this throws, it will also be passed to the domain
150
+ * // so the error-handling logic can be moved to the 'error'
151
+ * // event on the domain instead of being repeated throughout
152
+ * // the program.
153
+ * return cb(null, JSON.parse(data));
154
+ * }));
155
+ * }
156
+ *
157
+ * d.on('error', (er) => {
158
+ * // An error occurred somewhere. If we throw it now, it will crash the program
159
+ * // with the normal line number and stack message.
160
+ * });
161
+ * ```
162
+ * @param callback The callback function
163
+ * @return The intercepted function
164
+ */
165
+ intercept<T extends Function>(callback: T): T;
166
+ }
167
+ function create(): Domain;
168
+ }