@types/node 18.19.22 → 18.19.24

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 (57) hide show
  1. node v18.19/README.md +1 -1
  2. node v18.19/crypto.d.ts +1 -1
  3. node v18.19/package.json +3 -10
  4. node v18.19/ts4.8/assert/strict.d.ts +0 -8
  5. node v18.19/ts4.8/assert.d.ts +0 -985
  6. node v18.19/ts4.8/async_hooks.d.ts +0 -522
  7. node v18.19/ts4.8/buffer.d.ts +0 -2353
  8. node v18.19/ts4.8/child_process.d.ts +0 -1544
  9. node v18.19/ts4.8/cluster.d.ts +0 -432
  10. node v18.19/ts4.8/console.d.ts +0 -412
  11. node v18.19/ts4.8/constants.d.ts +0 -19
  12. node v18.19/ts4.8/crypto.d.ts +0 -4457
  13. node v18.19/ts4.8/dgram.d.ts +0 -596
  14. node v18.19/ts4.8/diagnostics_channel.d.ts +0 -546
  15. node v18.19/ts4.8/dns/promises.d.ts +0 -381
  16. node v18.19/ts4.8/dns.d.ts +0 -809
  17. node v18.19/ts4.8/dom-events.d.ts +0 -122
  18. node v18.19/ts4.8/domain.d.ts +0 -170
  19. node v18.19/ts4.8/events.d.ts +0 -819
  20. node v18.19/ts4.8/fs/promises.d.ts +0 -1205
  21. node v18.19/ts4.8/fs.d.ts +0 -4231
  22. node v18.19/ts4.8/globals.d.ts +0 -377
  23. node v18.19/ts4.8/globals.global.d.ts +0 -1
  24. node v18.19/ts4.8/http.d.ts +0 -1803
  25. node v18.19/ts4.8/http2.d.ts +0 -2386
  26. node v18.19/ts4.8/https.d.ts +0 -544
  27. node v18.19/ts4.8/index.d.ts +0 -88
  28. node v18.19/ts4.8/inspector.d.ts +0 -2739
  29. node v18.19/ts4.8/module.d.ts +0 -298
  30. node v18.19/ts4.8/net.d.ts +0 -918
  31. node v18.19/ts4.8/os.d.ts +0 -473
  32. node v18.19/ts4.8/path.d.ts +0 -191
  33. node v18.19/ts4.8/perf_hooks.d.ts +0 -626
  34. node v18.19/ts4.8/process.d.ts +0 -1548
  35. node v18.19/ts4.8/punycode.d.ts +0 -117
  36. node v18.19/ts4.8/querystring.d.ts +0 -141
  37. node v18.19/ts4.8/readline/promises.d.ts +0 -143
  38. node v18.19/ts4.8/readline.d.ts +0 -666
  39. node v18.19/ts4.8/repl.d.ts +0 -430
  40. node v18.19/ts4.8/stream/consumers.d.ts +0 -12
  41. node v18.19/ts4.8/stream/promises.d.ts +0 -83
  42. node v18.19/ts4.8/stream/web.d.ts +0 -352
  43. node v18.19/ts4.8/stream.d.ts +0 -1731
  44. node v18.19/ts4.8/string_decoder.d.ts +0 -67
  45. node v18.19/ts4.8/test.d.ts +0 -1113
  46. node v18.19/ts4.8/timers/promises.d.ts +0 -93
  47. node v18.19/ts4.8/timers.d.ts +0 -126
  48. node v18.19/ts4.8/tls.d.ts +0 -1203
  49. node v18.19/ts4.8/trace_events.d.ts +0 -171
  50. node v18.19/ts4.8/tty.d.ts +0 -206
  51. node v18.19/ts4.8/url.d.ts +0 -954
  52. node v18.19/ts4.8/util.d.ts +0 -2075
  53. node v18.19/ts4.8/v8.d.ts +0 -753
  54. node v18.19/ts4.8/vm.d.ts +0 -667
  55. node v18.19/ts4.8/wasi.d.ts +0 -158
  56. node v18.19/ts4.8/worker_threads.d.ts +0 -692
  57. node v18.19/ts4.8/zlib.d.ts +0 -517
@@ -1,298 +0,0 @@
1
- /**
2
- * @since v0.3.7
3
- */
4
- declare module "module" {
5
- import { URL } from "node:url";
6
- import { MessagePort } from "node:worker_threads";
7
- namespace Module {
8
- /**
9
- * The `module.syncBuiltinESMExports()` method updates all the live bindings for
10
- * builtin `ES Modules` to match the properties of the `CommonJS` exports. It
11
- * does not add or remove exported names from the `ES Modules`.
12
- *
13
- * ```js
14
- * const fs = require('fs');
15
- * const assert = require('assert');
16
- * const { syncBuiltinESMExports } = require('module');
17
- *
18
- * fs.readFile = newAPI;
19
- *
20
- * delete fs.readFileSync;
21
- *
22
- * function newAPI() {
23
- * // ...
24
- * }
25
- *
26
- * fs.newAPI = newAPI;
27
- *
28
- * syncBuiltinESMExports();
29
- *
30
- * import('fs').then((esmFS) => {
31
- * // It syncs the existing readFile property with the new value
32
- * assert.strictEqual(esmFS.readFile, newAPI);
33
- * // readFileSync has been deleted from the required fs
34
- * assert.strictEqual('readFileSync' in fs, false);
35
- * // syncBuiltinESMExports() does not remove readFileSync from esmFS
36
- * assert.strictEqual('readFileSync' in esmFS, true);
37
- * // syncBuiltinESMExports() does not add names
38
- * assert.strictEqual(esmFS.newAPI, undefined);
39
- * });
40
- * ```
41
- * @since v12.12.0
42
- */
43
- function syncBuiltinESMExports(): void;
44
- /**
45
- * `path` is the resolved path for the file for which a corresponding source map
46
- * should be fetched.
47
- * @since v13.7.0, v12.17.0
48
- */
49
- function findSourceMap(path: string, error?: Error): SourceMap;
50
- interface SourceMapPayload {
51
- file: string;
52
- version: number;
53
- sources: string[];
54
- sourcesContent: string[];
55
- names: string[];
56
- mappings: string;
57
- sourceRoot: string;
58
- }
59
- interface SourceMapping {
60
- generatedLine: number;
61
- generatedColumn: number;
62
- originalSource: string;
63
- originalLine: number;
64
- originalColumn: number;
65
- }
66
- interface SourceOrigin {
67
- /**
68
- * The name of the range in the source map, if one was provided
69
- */
70
- name?: string;
71
- /**
72
- * The file name of the original source, as reported in the SourceMap
73
- */
74
- fileName: string;
75
- /**
76
- * The 1-indexed lineNumber of the corresponding call site in the original source
77
- */
78
- lineNumber: number;
79
- /**
80
- * The 1-indexed columnNumber of the corresponding call site in the original source
81
- */
82
- columnNumber: number;
83
- }
84
- /**
85
- * @since v13.7.0, v12.17.0
86
- */
87
- class SourceMap {
88
- /**
89
- * Getter for the payload used to construct the `SourceMap` instance.
90
- */
91
- readonly payload: SourceMapPayload;
92
- constructor(payload: SourceMapPayload);
93
- /**
94
- * Given a line offset and column offset in the generated source
95
- * file, returns an object representing the SourceMap range in the
96
- * original file if found, or an empty object if not.
97
- *
98
- * The object returned contains the following keys:
99
- *
100
- * The returned value represents the raw range as it appears in the
101
- * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
102
- * column numbers as they appear in Error messages and CallSite
103
- * objects.
104
- *
105
- * To get the corresponding 1-indexed line and column numbers from a
106
- * lineNumber and columnNumber as they are reported by Error stacks
107
- * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
108
- * @param lineOffset The zero-indexed line number offset in the generated source
109
- * @param columnOffset The zero-indexed column number offset in the generated source
110
- */
111
- findEntry(lineOffset: number, columnOffset: number): SourceMapping;
112
- /**
113
- * Given a 1-indexed `lineNumber` and `columnNumber` from a call site in the generated source,
114
- * find the corresponding call site location in the original source.
115
- *
116
- * If the `lineNumber` and `columnNumber` provided are not found in any source map,
117
- * then an empty object is returned.
118
- * @param lineNumber The 1-indexed line number of the call site in the generated source
119
- * @param columnNumber The 1-indexed column number of the call site in the generated source
120
- */
121
- findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {};
122
- }
123
- /** @deprecated Use `ImportAttributes` instead */
124
- interface ImportAssertions extends ImportAttributes {}
125
- interface ImportAttributes extends NodeJS.Dict<string> {
126
- type?: string | undefined;
127
- }
128
- type ModuleFormat = "builtin" | "commonjs" | "json" | "module" | "wasm";
129
- type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
130
- interface GlobalPreloadContext {
131
- port: MessagePort;
132
- }
133
- /**
134
- * @deprecated This hook will be removed in a future version.
135
- * Use `initialize` instead. When a loader has an `initialize` export, `globalPreload` will be ignored.
136
- *
137
- * Sometimes it might be necessary to run some code inside of the same global scope that the application runs in.
138
- * This hook allows the return of a string that is run as a sloppy-mode script on startup.
139
- *
140
- * @param context Information to assist the preload code
141
- * @return Code to run before application startup
142
- */
143
- type GlobalPreloadHook = (context: GlobalPreloadContext) => string;
144
- /**
145
- * The `initialize` hook provides a way to define a custom function that runs in the hooks thread
146
- * when the hooks module is initialized. Initialization happens when the hooks module is registered via `register`.
147
- *
148
- * This hook can receive data from a `register` invocation, including ports and other transferrable objects.
149
- * The return value of `initialize` can be a `Promise`, in which case it will be awaited before the main application thread execution resumes.
150
- */
151
- type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
152
- interface ResolveHookContext {
153
- /**
154
- * Export conditions of the relevant `package.json`
155
- */
156
- conditions: string[];
157
- /**
158
- * @deprecated Use `importAttributes` instead
159
- */
160
- importAssertions: ImportAttributes;
161
- /**
162
- * An object whose key-value pairs represent the assertions for the module to import
163
- */
164
- importAttributes: ImportAttributes;
165
- /**
166
- * The module importing this one, or undefined if this is the Node.js entry point
167
- */
168
- parentURL: string | undefined;
169
- }
170
- interface ResolveFnOutput {
171
- /**
172
- * A hint to the load hook (it might be ignored)
173
- */
174
- format?: ModuleFormat | null | undefined;
175
- /**
176
- * @deprecated Use `importAttributes` instead
177
- */
178
- importAssertions?: ImportAttributes | undefined;
179
- /**
180
- * The import attributes to use when caching the module (optional; if excluded the input will be used)
181
- */
182
- importAttributes?: ImportAttributes | undefined;
183
- /**
184
- * A signal that this hook intends to terminate the chain of `resolve` hooks.
185
- * @default false
186
- */
187
- shortCircuit?: boolean | undefined;
188
- /**
189
- * The absolute URL to which this input resolves
190
- */
191
- url: string;
192
- }
193
- /**
194
- * The `resolve` hook chain is responsible for resolving file URL for a given module specifier and parent URL, and optionally its format (such as `'module'`) as a hint to the `load` hook.
195
- * If a format is specified, the load hook is ultimately responsible for providing the final `format` value (and it is free to ignore the hint provided by `resolve`);
196
- * if `resolve` provides a format, a custom `load` hook is required even if only to pass the value to the Node.js default `load` hook.
197
- *
198
- * @param specifier The specified URL path of the module to be resolved
199
- * @param context
200
- * @param nextResolve The subsequent `resolve` hook in the chain, or the Node.js default `resolve` hook after the last user-supplied resolve hook
201
- */
202
- type ResolveHook = (
203
- specifier: string,
204
- context: ResolveHookContext,
205
- nextResolve: (
206
- specifier: string,
207
- context?: ResolveHookContext,
208
- ) => ResolveFnOutput | Promise<ResolveFnOutput>,
209
- ) => ResolveFnOutput | Promise<ResolveFnOutput>;
210
- interface LoadHookContext {
211
- /**
212
- * Export conditions of the relevant `package.json`
213
- */
214
- conditions: string[];
215
- /**
216
- * The format optionally supplied by the `resolve` hook chain
217
- */
218
- format: ModuleFormat;
219
- /**
220
- * @deprecated Use `importAttributes` instead
221
- */
222
- importAssertions: ImportAttributes;
223
- /**
224
- * An object whose key-value pairs represent the assertions for the module to import
225
- */
226
- importAttributes: ImportAttributes;
227
- }
228
- interface LoadFnOutput {
229
- format: ModuleFormat;
230
- /**
231
- * A signal that this hook intends to terminate the chain of `resolve` hooks.
232
- * @default false
233
- */
234
- shortCircuit?: boolean | undefined;
235
- /**
236
- * The source for Node.js to evaluate
237
- */
238
- source?: ModuleSource;
239
- }
240
- /**
241
- * The `load` hook provides a way to define a custom method of determining how a URL should be interpreted, retrieved, and parsed.
242
- * It is also in charge of validating the import assertion.
243
- *
244
- * @param url The URL/path of the module to be loaded
245
- * @param context Metadata about the module
246
- * @param nextLoad The subsequent `load` hook in the chain, or the Node.js default `load` hook after the last user-supplied `load` hook
247
- */
248
- type LoadHook = (
249
- url: string,
250
- context: LoadHookContext,
251
- nextLoad: (url: string, context?: LoadHookContext) => LoadFnOutput | Promise<LoadFnOutput>,
252
- ) => LoadFnOutput | Promise<LoadFnOutput>;
253
- }
254
- interface RegisterOptions<Data> {
255
- parentURL: string | URL;
256
- data?: Data | undefined;
257
- transferList?: any[] | undefined;
258
- }
259
- interface Module extends NodeModule {}
260
- class Module {
261
- static runMain(): void;
262
- static wrap(code: string): string;
263
- static createRequire(path: string | URL): NodeRequire;
264
- static builtinModules: string[];
265
- static isBuiltin(moduleName: string): boolean;
266
- static Module: typeof Module;
267
- static register<Data = any>(
268
- specifier: string | URL,
269
- parentURL?: string | URL,
270
- options?: RegisterOptions<Data>,
271
- ): void;
272
- static register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
273
- constructor(id: string, parent?: Module);
274
- }
275
- global {
276
- interface ImportMeta {
277
- url: string;
278
- /**
279
- * @experimental
280
- * This feature is only available with the `--experimental-import-meta-resolve`
281
- * command flag enabled.
282
- *
283
- * Provides a module-relative resolution function scoped to each module, returning
284
- * the URL string.
285
- *
286
- * @param specified The module specifier to resolve relative to `parent`.
287
- * @param parent The absolute parent module URL to resolve from. If none
288
- * is specified, the value of `import.meta.url` is used as the default.
289
- */
290
- resolve?(specified: string, parent?: string | URL): Promise<string>;
291
- }
292
- }
293
- export = Module;
294
- }
295
- declare module "node:module" {
296
- import module = require("module");
297
- export = module;
298
- }