@types/node 18.19.21 → 18.19.23
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.
- node v18.19/README.md +2 -2
- node v18.19/package.json +3 -15
- node v18.19/ts4.8/assert/strict.d.ts +0 -8
- node v18.19/ts4.8/assert.d.ts +0 -985
- node v18.19/ts4.8/async_hooks.d.ts +0 -522
- node v18.19/ts4.8/buffer.d.ts +0 -2353
- node v18.19/ts4.8/child_process.d.ts +0 -1544
- node v18.19/ts4.8/cluster.d.ts +0 -432
- node v18.19/ts4.8/console.d.ts +0 -412
- node v18.19/ts4.8/constants.d.ts +0 -19
- node v18.19/ts4.8/crypto.d.ts +0 -4457
- node v18.19/ts4.8/dgram.d.ts +0 -596
- node v18.19/ts4.8/diagnostics_channel.d.ts +0 -546
- node v18.19/ts4.8/dns/promises.d.ts +0 -381
- node v18.19/ts4.8/dns.d.ts +0 -809
- node v18.19/ts4.8/dom-events.d.ts +0 -122
- node v18.19/ts4.8/domain.d.ts +0 -170
- node v18.19/ts4.8/events.d.ts +0 -819
- node v18.19/ts4.8/fs/promises.d.ts +0 -1205
- node v18.19/ts4.8/fs.d.ts +0 -4231
- node v18.19/ts4.8/globals.d.ts +0 -377
- node v18.19/ts4.8/globals.global.d.ts +0 -1
- node v18.19/ts4.8/http.d.ts +0 -1803
- node v18.19/ts4.8/http2.d.ts +0 -2386
- node v18.19/ts4.8/https.d.ts +0 -544
- node v18.19/ts4.8/index.d.ts +0 -88
- node v18.19/ts4.8/inspector.d.ts +0 -2739
- node v18.19/ts4.8/module.d.ts +0 -298
- node v18.19/ts4.8/net.d.ts +0 -918
- node v18.19/ts4.8/os.d.ts +0 -473
- node v18.19/ts4.8/path.d.ts +0 -191
- node v18.19/ts4.8/perf_hooks.d.ts +0 -626
- node v18.19/ts4.8/process.d.ts +0 -1548
- node v18.19/ts4.8/punycode.d.ts +0 -117
- node v18.19/ts4.8/querystring.d.ts +0 -141
- node v18.19/ts4.8/readline/promises.d.ts +0 -143
- node v18.19/ts4.8/readline.d.ts +0 -666
- node v18.19/ts4.8/repl.d.ts +0 -430
- node v18.19/ts4.8/stream/consumers.d.ts +0 -12
- node v18.19/ts4.8/stream/promises.d.ts +0 -83
- node v18.19/ts4.8/stream/web.d.ts +0 -352
- node v18.19/ts4.8/stream.d.ts +0 -1731
- node v18.19/ts4.8/string_decoder.d.ts +0 -67
- node v18.19/ts4.8/test.d.ts +0 -1113
- node v18.19/ts4.8/timers/promises.d.ts +0 -93
- node v18.19/ts4.8/timers.d.ts +0 -126
- node v18.19/ts4.8/tls.d.ts +0 -1203
- node v18.19/ts4.8/trace_events.d.ts +0 -171
- node v18.19/ts4.8/tty.d.ts +0 -206
- node v18.19/ts4.8/url.d.ts +0 -954
- node v18.19/ts4.8/util.d.ts +0 -2075
- node v18.19/ts4.8/v8.d.ts +0 -753
- node v18.19/ts4.8/vm.d.ts +0 -667
- node v18.19/ts4.8/wasi.d.ts +0 -158
- node v18.19/ts4.8/worker_threads.d.ts +0 -692
- node v18.19/ts4.8/zlib.d.ts +0 -517
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `timers/promises` API provides an alternative set of timer functions
|
|
3
|
-
* that return `Promise` objects. The API is accessible via`require('timers/promises')`.
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import {
|
|
7
|
-
* setTimeout,
|
|
8
|
-
* setImmediate,
|
|
9
|
-
* setInterval,
|
|
10
|
-
* } from 'timers/promises';
|
|
11
|
-
* ```
|
|
12
|
-
* @since v15.0.0
|
|
13
|
-
*/
|
|
14
|
-
declare module "timers/promises" {
|
|
15
|
-
import { TimerOptions } from "node:timers";
|
|
16
|
-
/**
|
|
17
|
-
* ```js
|
|
18
|
-
* import {
|
|
19
|
-
* setTimeout,
|
|
20
|
-
* } from 'timers/promises';
|
|
21
|
-
*
|
|
22
|
-
* const res = await setTimeout(100, 'result');
|
|
23
|
-
*
|
|
24
|
-
* console.log(res); // Prints 'result'
|
|
25
|
-
* ```
|
|
26
|
-
* @since v15.0.0
|
|
27
|
-
* @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
|
|
28
|
-
* @param value A value with which the promise is fulfilled.
|
|
29
|
-
*/
|
|
30
|
-
function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
|
|
31
|
-
/**
|
|
32
|
-
* ```js
|
|
33
|
-
* import {
|
|
34
|
-
* setImmediate,
|
|
35
|
-
* } from 'timers/promises';
|
|
36
|
-
*
|
|
37
|
-
* const res = await setImmediate('result');
|
|
38
|
-
*
|
|
39
|
-
* console.log(res); // Prints 'result'
|
|
40
|
-
* ```
|
|
41
|
-
* @since v15.0.0
|
|
42
|
-
* @param value A value with which the promise is fulfilled.
|
|
43
|
-
*/
|
|
44
|
-
function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns an async iterator that generates values in an interval of `delay` ms.
|
|
47
|
-
*
|
|
48
|
-
* ```js
|
|
49
|
-
* import {
|
|
50
|
-
* setInterval,
|
|
51
|
-
* } from 'timers/promises';
|
|
52
|
-
*
|
|
53
|
-
* const interval = 100;
|
|
54
|
-
* for await (const startTime of setInterval(interval, Date.now())) {
|
|
55
|
-
* const now = Date.now();
|
|
56
|
-
* console.log(now);
|
|
57
|
-
* if ((now - startTime) > 1000)
|
|
58
|
-
* break;
|
|
59
|
-
* }
|
|
60
|
-
* console.log(Date.now());
|
|
61
|
-
* ```
|
|
62
|
-
* @since v15.9.0
|
|
63
|
-
*/
|
|
64
|
-
function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
|
|
65
|
-
|
|
66
|
-
interface Scheduler {
|
|
67
|
-
/**
|
|
68
|
-
* ```js
|
|
69
|
-
* import { scheduler } from 'node:timers/promises';
|
|
70
|
-
*
|
|
71
|
-
* await scheduler.wait(1000); // Wait one second before continuing
|
|
72
|
-
* ```
|
|
73
|
-
* An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
|
|
74
|
-
* Calling timersPromises.scheduler.wait(delay, options) is roughly equivalent to calling timersPromises.setTimeout(delay, undefined, options) except that the ref option is not supported.
|
|
75
|
-
* @since v16.14.0
|
|
76
|
-
* @experimental
|
|
77
|
-
* @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
|
|
78
|
-
*/
|
|
79
|
-
wait: (delay?: number, options?: TimerOptions) => Promise<void>;
|
|
80
|
-
/**
|
|
81
|
-
* An experimental API defined by the Scheduling APIs draft specification being developed as a standard Web Platform API.
|
|
82
|
-
* Calling timersPromises.scheduler.yield() is equivalent to calling timersPromises.setImmediate() with no arguments.
|
|
83
|
-
* @since v16.14.0
|
|
84
|
-
* @experimental
|
|
85
|
-
*/
|
|
86
|
-
yield: () => Promise<void>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const scheduler: Scheduler;
|
|
90
|
-
}
|
|
91
|
-
declare module "node:timers/promises" {
|
|
92
|
-
export * from "timers/promises";
|
|
93
|
-
}
|
node v18.19/ts4.8/timers.d.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `timer` module exposes a global API for scheduling functions to
|
|
3
|
-
* be called at some future period of time. Because the timer functions are
|
|
4
|
-
* globals, there is no need to call `require('timers')` to use the API.
|
|
5
|
-
*
|
|
6
|
-
* The timer functions within Node.js implement a similar API as the timers API
|
|
7
|
-
* provided by Web Browsers but use a different internal implementation that is
|
|
8
|
-
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js)
|
|
10
|
-
*/
|
|
11
|
-
declare module "timers" {
|
|
12
|
-
import { Abortable } from "node:events";
|
|
13
|
-
import {
|
|
14
|
-
setImmediate as setImmediatePromise,
|
|
15
|
-
setInterval as setIntervalPromise,
|
|
16
|
-
setTimeout as setTimeoutPromise,
|
|
17
|
-
} from "node:timers/promises";
|
|
18
|
-
interface TimerOptions extends Abortable {
|
|
19
|
-
/**
|
|
20
|
-
* Set to `false` to indicate that the scheduled `Timeout`
|
|
21
|
-
* should not require the Node.js event loop to remain active.
|
|
22
|
-
* @default true
|
|
23
|
-
*/
|
|
24
|
-
ref?: boolean | undefined;
|
|
25
|
-
}
|
|
26
|
-
let setTimeout: typeof global.setTimeout;
|
|
27
|
-
let clearTimeout: typeof global.clearTimeout;
|
|
28
|
-
let setInterval: typeof global.setInterval;
|
|
29
|
-
let clearInterval: typeof global.clearInterval;
|
|
30
|
-
let setImmediate: typeof global.setImmediate;
|
|
31
|
-
let clearImmediate: typeof global.clearImmediate;
|
|
32
|
-
global {
|
|
33
|
-
namespace NodeJS {
|
|
34
|
-
// compatibility with older typings
|
|
35
|
-
interface Timer extends RefCounted {
|
|
36
|
-
hasRef(): boolean;
|
|
37
|
-
refresh(): this;
|
|
38
|
-
[Symbol.toPrimitive](): number;
|
|
39
|
-
}
|
|
40
|
-
interface Immediate extends RefCounted {
|
|
41
|
-
/**
|
|
42
|
-
* If true, the `Immediate` object will keep the Node.js event loop active.
|
|
43
|
-
* @since v11.0.0
|
|
44
|
-
*/
|
|
45
|
-
hasRef(): boolean;
|
|
46
|
-
_onImmediate: Function; // to distinguish it from the Timeout class
|
|
47
|
-
/**
|
|
48
|
-
* Cancels the immediate. This is similar to calling `clearImmediate()`.
|
|
49
|
-
* @since v18.18.0
|
|
50
|
-
*/
|
|
51
|
-
[Symbol.dispose](): void;
|
|
52
|
-
}
|
|
53
|
-
interface Timeout extends Timer {
|
|
54
|
-
/**
|
|
55
|
-
* If true, the `Timeout` object will keep the Node.js event loop active.
|
|
56
|
-
* @since v11.0.0
|
|
57
|
-
*/
|
|
58
|
-
hasRef(): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Sets the timer's start time to the current time, and reschedules the timer to
|
|
61
|
-
* call its callback at the previously specified duration adjusted to the current
|
|
62
|
-
* time. This is useful for refreshing a timer without allocating a new
|
|
63
|
-
* JavaScript object.
|
|
64
|
-
*
|
|
65
|
-
* Using this on a timer that has already called its callback will reactivate the
|
|
66
|
-
* timer.
|
|
67
|
-
* @since v10.2.0
|
|
68
|
-
* @return a reference to `timeout`
|
|
69
|
-
*/
|
|
70
|
-
refresh(): this;
|
|
71
|
-
[Symbol.toPrimitive](): number;
|
|
72
|
-
/**
|
|
73
|
-
* Cancels the timeout.
|
|
74
|
-
* @since v18.18.0
|
|
75
|
-
*/
|
|
76
|
-
[Symbol.dispose](): void;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Schedules execution of a one-time `callback` after `delay` milliseconds. The `callback` will likely not be invoked in precisely `delay` milliseconds.
|
|
81
|
-
* Node.js makes no guarantees about the exact timing of when callbacks will fire, nor of their ordering. The callback will be called as close as possible to the time specified.
|
|
82
|
-
* When `delay` is larger than `2147483647` or less than `1`, the `delay` will be set to `1`. Non-integer delays are truncated to an integer.
|
|
83
|
-
* If `callback` is not a function, a [TypeError](https://nodejs.org/api/errors.html#class-typeerror) will be thrown.
|
|
84
|
-
* @since v0.0.1
|
|
85
|
-
*/
|
|
86
|
-
function setTimeout<TArgs extends any[]>(
|
|
87
|
-
callback: (...args: TArgs) => void,
|
|
88
|
-
ms?: number,
|
|
89
|
-
...args: TArgs
|
|
90
|
-
): NodeJS.Timeout;
|
|
91
|
-
// util.promisify no rest args compability
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
93
|
-
function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
|
|
94
|
-
namespace setTimeout {
|
|
95
|
-
const __promisify__: typeof setTimeoutPromise;
|
|
96
|
-
}
|
|
97
|
-
function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
|
|
98
|
-
function setInterval<TArgs extends any[]>(
|
|
99
|
-
callback: (...args: TArgs) => void,
|
|
100
|
-
ms?: number,
|
|
101
|
-
...args: TArgs
|
|
102
|
-
): NodeJS.Timeout;
|
|
103
|
-
// util.promisify no rest args compability
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
105
|
-
function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
|
|
106
|
-
namespace setInterval {
|
|
107
|
-
const __promisify__: typeof setIntervalPromise;
|
|
108
|
-
}
|
|
109
|
-
function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
|
|
110
|
-
function setImmediate<TArgs extends any[]>(
|
|
111
|
-
callback: (...args: TArgs) => void,
|
|
112
|
-
...args: TArgs
|
|
113
|
-
): NodeJS.Immediate;
|
|
114
|
-
// util.promisify no rest args compability
|
|
115
|
-
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
116
|
-
function setImmediate(callback: (args: void) => void): NodeJS.Immediate;
|
|
117
|
-
namespace setImmediate {
|
|
118
|
-
const __promisify__: typeof setImmediatePromise;
|
|
119
|
-
}
|
|
120
|
-
function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
|
|
121
|
-
function queueMicrotask(callback: () => void): void;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
declare module "node:timers" {
|
|
125
|
-
export * from "timers";
|
|
126
|
-
}
|