@scriptc/cli-darwin-x64 0.2.3 → 0.2.5
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/dist/THIRD_PARTY_NOTICES +1 -1
- package/dist/bin/scriptc +0 -0
- package/dist/bin/scriptc.json +1 -1
- package/dist/lib/declarations/scriptc-node-fallback.d.ts +915 -215
- package/dist/lib/declarations/scriptc-overrides.d.ts +5 -1
- package/dist/lib/declarations/scriptc.d.ts +22 -2
- package/dist/lib/llvm/bin/scriptc-llvm-codegen +0 -0
- package/dist/lib/llvm/package.json +1 -1
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/default/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-dev/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/library-thread-release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/default/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_array.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bigint.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_bytes_io.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_copying.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_cycle.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_json.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_lib.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_map.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_number.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_regex.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_string.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic/scr_util_compare.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/dynamic-text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/artifacts/release/runtime/text-decoder-legacy/scr_bytes.o +0 -0
- package/dist/lib/runtime-darwin-x64/package.json +1 -1
- package/dist/lib/runtime-darwin-x64/runtime-pack.json +215 -215
- package/dist/lib/runtime-sources/package.json +1 -1
- package/dist/lib/runtime-sources/src/scr_array.c +317 -40
- package/dist/lib/runtime-sources/src/scr_async.test.ts +16 -6
- package/dist/lib/runtime-sources/src/scr_bigint.c +15 -0
- package/dist/lib/runtime-sources/src/scr_bytes.c +437 -216
- package/dist/lib/runtime-sources/src/scr_bytes.test.c +85 -0
- package/dist/lib/runtime-sources/src/scr_bytes_io.c +0 -34
- package/dist/lib/runtime-sources/src/scr_copying.c +12 -2
- package/dist/lib/runtime-sources/src/scr_cycle.c +84 -60
- package/dist/lib/runtime-sources/src/scr_json.c +494 -161
- package/dist/lib/runtime-sources/src/scr_json.test.c +323 -1
- package/dist/lib/runtime-sources/src/scr_json.test.ts +58 -25
- package/dist/lib/runtime-sources/src/scr_key.h +68 -0
- package/dist/lib/runtime-sources/src/scr_lib.c +177 -89
- package/dist/lib/runtime-sources/src/scr_map.c +268 -96
- package/dist/lib/runtime-sources/src/scr_number.c +2 -4
- package/dist/lib/runtime-sources/src/scr_numeric.h +25 -0
- package/dist/lib/runtime-sources/src/scr_numeric.test.c +37 -0
- package/dist/lib/runtime-sources/src/scr_numeric.test.ts +33 -0
- package/dist/lib/runtime-sources/src/scr_regex.c +255 -145
- package/dist/lib/runtime-sources/src/scr_runtime.h +76 -19
- package/dist/lib/runtime-sources/src/scr_string.c +184 -42
- package/package.json +1 -1
|
@@ -252,12 +252,20 @@ declare var process: {
|
|
|
252
252
|
* completion callback overloads match Node's WritableStream surface. */
|
|
253
253
|
stdout: {
|
|
254
254
|
write(data: string | Uint8Array, callback?: (error?: Error | null) => void): boolean;
|
|
255
|
-
write(
|
|
255
|
+
write(
|
|
256
|
+
data: string | Uint8Array,
|
|
257
|
+
encoding: BufferEncoding,
|
|
258
|
+
callback?: (error?: Error | null) => void,
|
|
259
|
+
): boolean;
|
|
256
260
|
readonly isTTY: boolean;
|
|
257
261
|
};
|
|
258
262
|
stderr: {
|
|
259
263
|
write(data: string | Uint8Array, callback?: (error?: Error | null) => void): boolean;
|
|
260
|
-
write(
|
|
264
|
+
write(
|
|
265
|
+
data: string | Uint8Array,
|
|
266
|
+
encoding: BufferEncoding,
|
|
267
|
+
callback?: (error?: Error | null) => void,
|
|
268
|
+
): boolean;
|
|
261
269
|
readonly isTTY: boolean;
|
|
262
270
|
};
|
|
263
271
|
/* The stdin stream, the piped-input slice: the TTY probe, the
|
|
@@ -318,7 +326,10 @@ declare var process: {
|
|
|
318
326
|
removeListener(event: "SIGINT" | "SIGTERM", listener: () => void): void;
|
|
319
327
|
removeListener(event: "exit", listener: (code: number) => void): void;
|
|
320
328
|
removeListener(event: "warning", listener: (warning: Error & { code?: string }) => void): void;
|
|
321
|
-
removeListener(
|
|
329
|
+
removeListener(
|
|
330
|
+
event: "unhandledRejection",
|
|
331
|
+
listener: (reason: unknown, promise: unknown) => void,
|
|
332
|
+
): void;
|
|
322
333
|
removeListener(event: "rejectionHandled", listener: (promise: unknown) => void): void;
|
|
323
334
|
/* emitWarning — Node's full grammar (string or Error warning; type/
|
|
324
335
|
* ctor/options second; code/ctor third). */
|
|
@@ -490,19 +501,49 @@ type BufferEncoding =
|
|
|
490
501
|
| "utf-16le"
|
|
491
502
|
| "ucs2"
|
|
492
503
|
| "ucs-2";
|
|
493
|
-
interface Buffer<
|
|
504
|
+
interface Buffer<
|
|
505
|
+
TArrayBuffer extends ArrayBufferLike = ArrayBufferLike,
|
|
506
|
+
> extends Uint8Array<TArrayBuffer> {
|
|
494
507
|
toString(encoding?: BufferEncoding, start?: number, end?: number): string;
|
|
495
508
|
equals(otherBuffer: Uint8Array): boolean;
|
|
496
|
-
compare(
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
509
|
+
compare(
|
|
510
|
+
target: Uint8Array,
|
|
511
|
+
targetStart?: number,
|
|
512
|
+
targetEnd?: number,
|
|
513
|
+
sourceStart?: number,
|
|
514
|
+
sourceEnd?: number,
|
|
515
|
+
): number;
|
|
516
|
+
indexOf(
|
|
517
|
+
value: string | number | Uint8Array,
|
|
518
|
+
byteOffset?: number | BufferEncoding,
|
|
519
|
+
encoding?: BufferEncoding,
|
|
520
|
+
): number;
|
|
521
|
+
lastIndexOf(
|
|
522
|
+
value: string | number | Uint8Array,
|
|
523
|
+
byteOffset?: number | BufferEncoding,
|
|
524
|
+
encoding?: BufferEncoding,
|
|
525
|
+
): number;
|
|
526
|
+
includes(
|
|
527
|
+
value: string | number | Buffer,
|
|
528
|
+
byteOffset?: number | BufferEncoding,
|
|
529
|
+
encoding?: BufferEncoding,
|
|
530
|
+
): boolean;
|
|
531
|
+
fill(
|
|
532
|
+
value: string | number | Uint8Array,
|
|
533
|
+
offset?: number | BufferEncoding,
|
|
534
|
+
end?: number | BufferEncoding,
|
|
535
|
+
encoding?: BufferEncoding,
|
|
536
|
+
): this;
|
|
501
537
|
copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
502
538
|
swap16(): Buffer;
|
|
503
539
|
swap32(): Buffer;
|
|
504
540
|
swap64(): Buffer;
|
|
505
|
-
write(
|
|
541
|
+
write(
|
|
542
|
+
string: string,
|
|
543
|
+
offset?: number | BufferEncoding,
|
|
544
|
+
length?: number | BufferEncoding,
|
|
545
|
+
encoding?: BufferEncoding,
|
|
546
|
+
): number;
|
|
506
547
|
subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
|
|
507
548
|
/* @types/node's spelling — the ArrayBuffer instantiation keeps the
|
|
508
549
|
* override compatible with the lib's Uint8Array.slice. */
|
|
@@ -577,7 +618,9 @@ declare var Buffer: BufferConstructor;
|
|
|
577
618
|
/* The WHATWG codec constructors. Instance types live in scriptc.d.ts so
|
|
578
619
|
* programs with @types/node have the same global type names. */
|
|
579
620
|
declare var TextEncoder: { new (): TextEncoder };
|
|
580
|
-
declare var TextDecoder: {
|
|
621
|
+
declare var TextDecoder: {
|
|
622
|
+
new (label?: string, options?: { fatal?: boolean; ignoreBOM?: boolean }): TextDecoder;
|
|
623
|
+
};
|
|
581
624
|
|
|
582
625
|
/* The WHATWG event surface (Node globals since v15): declared so the
|
|
583
626
|
* suite's event-plumbing tests typecheck and fence per SITE with the
|
|
@@ -605,7 +648,10 @@ interface Event {
|
|
|
605
648
|
composedPath(): unknown[];
|
|
606
649
|
}
|
|
607
650
|
declare var Event: {
|
|
608
|
-
new (
|
|
651
|
+
new (
|
|
652
|
+
type: string,
|
|
653
|
+
eventInitDict?: { bubbles?: boolean; cancelable?: boolean; composed?: boolean },
|
|
654
|
+
): Event;
|
|
609
655
|
readonly prototype: Event;
|
|
610
656
|
readonly NONE: 0;
|
|
611
657
|
readonly CAPTURING_PHASE: 1;
|
|
@@ -616,7 +662,10 @@ interface CustomEvent<T = unknown> extends Event {
|
|
|
616
662
|
readonly detail: T;
|
|
617
663
|
}
|
|
618
664
|
declare var CustomEvent: {
|
|
619
|
-
new <T = unknown>(
|
|
665
|
+
new <T = unknown>(
|
|
666
|
+
type: string,
|
|
667
|
+
eventInitDict?: { detail?: T; bubbles?: boolean; cancelable?: boolean; composed?: boolean },
|
|
668
|
+
): CustomEvent<T>;
|
|
620
669
|
readonly prototype: CustomEvent;
|
|
621
670
|
};
|
|
622
671
|
interface MessageEvent<T = unknown> extends Event {
|
|
@@ -626,7 +675,10 @@ interface MessageEvent<T = unknown> extends Event {
|
|
|
626
675
|
readonly ports: readonly MessagePort[];
|
|
627
676
|
}
|
|
628
677
|
declare var MessageEvent: {
|
|
629
|
-
new <T = unknown>(
|
|
678
|
+
new <T = unknown>(
|
|
679
|
+
type: string,
|
|
680
|
+
eventInitDict?: { data?: T; origin?: string; lastEventId?: string },
|
|
681
|
+
): MessageEvent<T>;
|
|
630
682
|
readonly prototype: MessageEvent;
|
|
631
683
|
};
|
|
632
684
|
interface AddEventListenerOptions {
|
|
@@ -789,10 +841,7 @@ interface Response {
|
|
|
789
841
|
bytes(): Promise<Uint8Array>;
|
|
790
842
|
}
|
|
791
843
|
interface ResponseInit {
|
|
792
|
-
headers?:
|
|
793
|
-
| Headers
|
|
794
|
-
| Record<string, string>
|
|
795
|
-
| readonly (readonly [string, string])[];
|
|
844
|
+
headers?: Headers | Record<string, string> | readonly (readonly [string, string])[];
|
|
796
845
|
status?: number;
|
|
797
846
|
statusText?: string;
|
|
798
847
|
}
|
|
@@ -832,10 +881,7 @@ interface Request {
|
|
|
832
881
|
}
|
|
833
882
|
interface RequestInit {
|
|
834
883
|
method?: string;
|
|
835
|
-
headers?:
|
|
836
|
-
| Headers
|
|
837
|
-
| Record<string, string>
|
|
838
|
-
| readonly (readonly [string, string])[];
|
|
884
|
+
headers?: Headers | Record<string, string> | readonly (readonly [string, string])[];
|
|
839
885
|
body?: string | Uint8Array | ReadableStream<Uint8Array> | null;
|
|
840
886
|
duplex?: "half";
|
|
841
887
|
redirect?: "follow" | "error" | "manual";
|
|
@@ -856,7 +902,11 @@ declare function fetch(input: string | URL, init?: RequestInit): Promise<Respons
|
|
|
856
902
|
* tolerance. */
|
|
857
903
|
declare function setInterval(callback: () => void, ms?: number): Timeout;
|
|
858
904
|
/* The trailing-argument form — setTimeout's exact story, every tick. */
|
|
859
|
-
declare function setInterval(
|
|
905
|
+
declare function setInterval(
|
|
906
|
+
callback: (...args: never[]) => void,
|
|
907
|
+
ms?: number,
|
|
908
|
+
...args: unknown[]
|
|
909
|
+
): Timeout;
|
|
860
910
|
declare function clearInterval(handle?: Timeout | number | null | undefined): void;
|
|
861
911
|
|
|
862
912
|
/* node:timers — the module twins of the timer globals (Node's timers
|
|
@@ -866,10 +916,18 @@ declare function clearInterval(handle?: Timeout | number | null | undefined): vo
|
|
|
866
916
|
* (enroll/unenroll, promises) fences per member. */
|
|
867
917
|
declare module "node:timers" {
|
|
868
918
|
export function setTimeout(callback: () => void, ms?: number): Timeout;
|
|
869
|
-
export function setTimeout(
|
|
919
|
+
export function setTimeout(
|
|
920
|
+
callback: (...args: never[]) => void,
|
|
921
|
+
ms?: number,
|
|
922
|
+
...args: unknown[]
|
|
923
|
+
): Timeout;
|
|
870
924
|
export function clearTimeout(handle?: Timeout | number | null | undefined): void;
|
|
871
925
|
export function setInterval(callback: () => void, ms?: number): Timeout;
|
|
872
|
-
export function setInterval(
|
|
926
|
+
export function setInterval(
|
|
927
|
+
callback: (...args: never[]) => void,
|
|
928
|
+
ms?: number,
|
|
929
|
+
...args: unknown[]
|
|
930
|
+
): Timeout;
|
|
873
931
|
export function clearInterval(handle?: Timeout | number | null | undefined): void;
|
|
874
932
|
export function setImmediate(callback: () => void): Immediate;
|
|
875
933
|
export function setImmediate(callback: (...args: never[]) => void, ...args: unknown[]): Immediate;
|
|
@@ -888,7 +946,11 @@ declare module "timers" {
|
|
|
888
946
|
declare module "node:timers/promises" {
|
|
889
947
|
export function setTimeout(delay?: number): Promise<void>;
|
|
890
948
|
export function setImmediate(): Promise<void>;
|
|
891
|
-
export function setInterval<T = unknown>(
|
|
949
|
+
export function setInterval<T = unknown>(
|
|
950
|
+
delay?: number,
|
|
951
|
+
value?: T,
|
|
952
|
+
options?: unknown,
|
|
953
|
+
): AsyncGenerator<T, void, undefined>;
|
|
892
954
|
export const scheduler: {
|
|
893
955
|
wait(delay?: number): Promise<void>;
|
|
894
956
|
yield(): Promise<void>;
|
|
@@ -921,7 +983,10 @@ declare module "node:diagnostics_channel" {
|
|
|
921
983
|
publish(message: unknown): void;
|
|
922
984
|
subscribe(onMessage: ChannelListener): void;
|
|
923
985
|
unsubscribe(onMessage: ChannelListener): boolean;
|
|
924
|
-
bindStore(
|
|
986
|
+
bindStore(
|
|
987
|
+
store: import("async_hooks").AsyncLocalStorage<any>,
|
|
988
|
+
transform?: (context: any) => any,
|
|
989
|
+
): void;
|
|
925
990
|
unbindStore(store: import("async_hooks").AsyncLocalStorage<any>): boolean;
|
|
926
991
|
runStores(context: unknown, fn: (...args: any[]) => any, thisArg?: any, ...args: any[]): any;
|
|
927
992
|
}
|
|
@@ -1086,7 +1151,12 @@ declare module "node:fs" {
|
|
|
1086
1151
|
data: string,
|
|
1087
1152
|
/* The options-record stance (see http.RequestOptions): flag fences
|
|
1088
1153
|
* by name at the call site; undocumented keys drop like Node. */
|
|
1089
|
-
options?: {
|
|
1154
|
+
options?: {
|
|
1155
|
+
mode?: number;
|
|
1156
|
+
encoding?: "utf8" | "utf-8";
|
|
1157
|
+
flag?: string;
|
|
1158
|
+
[option: string]: unknown;
|
|
1159
|
+
},
|
|
1090
1160
|
): void;
|
|
1091
1161
|
/* The bare-encoding spelling — the options record's encoding key alone. */
|
|
1092
1162
|
export function writeFileSync(path: string, data: string, encoding: "utf8" | "utf-8"): void;
|
|
@@ -1099,36 +1169,87 @@ declare module "node:fs" {
|
|
|
1099
1169
|
export function chmodSync(path: string, mode: number): void;
|
|
1100
1170
|
export function fchmodSync(fd: number, mode: number): void;
|
|
1101
1171
|
export function fsyncSync(fd: number): void;
|
|
1102
|
-
export function linkSync(
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
export function
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
export function
|
|
1112
|
-
|
|
1113
|
-
|
|
1172
|
+
export function linkSync(
|
|
1173
|
+
existingPath: string | Uint8Array | URL,
|
|
1174
|
+
newPath: string | Uint8Array | URL,
|
|
1175
|
+
): void;
|
|
1176
|
+
export function symlinkSync(
|
|
1177
|
+
target: string | Uint8Array | URL,
|
|
1178
|
+
path: string | Uint8Array | URL,
|
|
1179
|
+
type?: string | null,
|
|
1180
|
+
): void;
|
|
1181
|
+
export function symlink(
|
|
1182
|
+
target: string | Uint8Array | URL,
|
|
1183
|
+
path: string | Uint8Array | URL,
|
|
1184
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1185
|
+
): void;
|
|
1186
|
+
export function symlink(
|
|
1187
|
+
target: string | Uint8Array | URL,
|
|
1188
|
+
path: string | Uint8Array | URL,
|
|
1189
|
+
type: string | null | undefined,
|
|
1190
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1191
|
+
): void;
|
|
1192
|
+
export function link(
|
|
1193
|
+
existingPath: string | Uint8Array | URL,
|
|
1194
|
+
newPath: string | Uint8Array | URL,
|
|
1195
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1196
|
+
): void;
|
|
1197
|
+
export function readlink(
|
|
1198
|
+
path: string | Uint8Array | URL,
|
|
1199
|
+
callback: (err: NodeJS.ErrnoException | null, target: string) => void,
|
|
1200
|
+
): void;
|
|
1201
|
+
export function readlink(
|
|
1202
|
+
path: string | Uint8Array | URL,
|
|
1203
|
+
options: "buffer" | { encoding: "buffer" },
|
|
1204
|
+
callback: (err: NodeJS.ErrnoException | null, target: Buffer) => void,
|
|
1205
|
+
): void;
|
|
1206
|
+
export function readlink(
|
|
1207
|
+
path: string | Uint8Array | URL,
|
|
1208
|
+
options: BufferEncoding | { encoding?: BufferEncoding | null } | null,
|
|
1209
|
+
callback: (err: NodeJS.ErrnoException | null, target: string) => void,
|
|
1210
|
+
): void;
|
|
1211
|
+
export function readlink(
|
|
1212
|
+
path: string | Uint8Array | URL,
|
|
1213
|
+
options: string | { encoding?: string | null } | null,
|
|
1214
|
+
callback: (err: NodeJS.ErrnoException | null, target: string | Buffer) => void,
|
|
1215
|
+
): void;
|
|
1216
|
+
export function readlinkSync(
|
|
1217
|
+
path: string | Uint8Array | URL,
|
|
1218
|
+
options: "buffer" | { encoding: "buffer" },
|
|
1219
|
+
): Buffer;
|
|
1220
|
+
export function readlinkSync(
|
|
1221
|
+
path: string | Uint8Array | URL,
|
|
1222
|
+
options?: BufferEncoding | { encoding?: BufferEncoding | null } | null,
|
|
1223
|
+
): string;
|
|
1224
|
+
export function readlinkSync(
|
|
1225
|
+
path: string | Uint8Array | URL,
|
|
1226
|
+
options: string | { encoding?: string | null } | null,
|
|
1227
|
+
): string | Buffer;
|
|
1114
1228
|
export function chownSync(path: string, uid: number, gid: number): void;
|
|
1115
1229
|
/* The 2-argument form only (Node's mode flags have no lowering). The
|
|
1116
1230
|
* destination is created or truncated carrying the SOURCE's mode. */
|
|
1117
1231
|
export function copyFileSync(src: string, dest: string): void;
|
|
1118
|
-
export function rename(
|
|
1232
|
+
export function rename(
|
|
1233
|
+
oldPath: string,
|
|
1234
|
+
newPath: string,
|
|
1235
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1236
|
+
): void;
|
|
1119
1237
|
export function renameSync(oldPath: string, newPath: string): void;
|
|
1120
1238
|
export function rmSync(path: string): void;
|
|
1121
1239
|
/* maxRetries/retryDelay are accepted no-ops (Node retries around
|
|
1122
1240
|
* EBUSY-class races; the synchronous lowering has no re-entrancy that
|
|
1123
1241
|
* needs them). */
|
|
1124
|
-
export function rmSync(
|
|
1242
|
+
export function rmSync(
|
|
1243
|
+
path: string,
|
|
1244
|
+
options: { recursive?: boolean; force?: boolean; maxRetries?: number; retryDelay?: number },
|
|
1245
|
+
): void;
|
|
1125
1246
|
export function rmdirSync(path: string): void;
|
|
1126
1247
|
export function readdirSync(path: string): string[];
|
|
1127
1248
|
/* The withFileTypes form: Dirent rows (name + parentPath + the type
|
|
1128
1249
|
* probes — the honest subset of Node's Dirent surface). The type is
|
|
1129
1250
|
* interned explicitly in type-mapper.ts (the record's hidden %dtype field
|
|
1130
1251
|
* carries the entry kind; isFile/isDirectory/isSymbolicLink lower as
|
|
1131
|
-
* reads of it in
|
|
1252
|
+
* reads of it in builtins/process.ts). */
|
|
1132
1253
|
export interface Dirent {
|
|
1133
1254
|
name: string;
|
|
1134
1255
|
parentPath: string;
|
|
@@ -1186,12 +1307,39 @@ declare module "node:fs" {
|
|
|
1186
1307
|
export function closeSync(fd: number): void;
|
|
1187
1308
|
export function fdatasyncSync(fd: number): void;
|
|
1188
1309
|
export function ftruncateSync(fd: number, len?: number): void;
|
|
1189
|
-
export function utimesSync(
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
export function
|
|
1310
|
+
export function utimesSync(
|
|
1311
|
+
path: string | Uint8Array | URL,
|
|
1312
|
+
atime: number | string | Date,
|
|
1313
|
+
mtime: number | string | Date,
|
|
1314
|
+
): void;
|
|
1315
|
+
export function futimesSync(
|
|
1316
|
+
fd: number,
|
|
1317
|
+
atime: number | string | Date,
|
|
1318
|
+
mtime: number | string | Date,
|
|
1319
|
+
): void;
|
|
1320
|
+
export function lutimesSync(
|
|
1321
|
+
path: string | Uint8Array | URL,
|
|
1322
|
+
atime: number | string | Date,
|
|
1323
|
+
mtime: number | string | Date,
|
|
1324
|
+
): void;
|
|
1325
|
+
export function utimes(
|
|
1326
|
+
path: string | Uint8Array | URL,
|
|
1327
|
+
atime: number | string | Date,
|
|
1328
|
+
mtime: number | string | Date,
|
|
1329
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1330
|
+
): void;
|
|
1331
|
+
export function futimes(
|
|
1332
|
+
fd: number,
|
|
1333
|
+
atime: number | string | Date,
|
|
1334
|
+
mtime: number | string | Date,
|
|
1335
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1336
|
+
): void;
|
|
1337
|
+
export function lutimes(
|
|
1338
|
+
path: string | Uint8Array | URL,
|
|
1339
|
+
atime: number | string | Date,
|
|
1340
|
+
mtime: number | string | Date,
|
|
1341
|
+
callback: (err: NodeJS.ErrnoException | null) => void,
|
|
1342
|
+
): void;
|
|
1195
1343
|
export function readvSync(fd: number, buffers: Uint8Array[], position?: number | null): number;
|
|
1196
1344
|
export function writevSync(fd: number, buffers: Uint8Array[], position?: number | null): number;
|
|
1197
1345
|
/* Read into a caller buffer from the fd's current position when position
|
|
@@ -1203,7 +1351,13 @@ declare module "node:fs" {
|
|
|
1203
1351
|
position?: number | null;
|
|
1204
1352
|
}
|
|
1205
1353
|
export function readSync(fd: number, buffer: Uint8Array, options?: ReadSyncOptions): number;
|
|
1206
|
-
export function readSync(
|
|
1354
|
+
export function readSync(
|
|
1355
|
+
fd: number,
|
|
1356
|
+
buffer: Uint8Array,
|
|
1357
|
+
offset: number,
|
|
1358
|
+
length: number,
|
|
1359
|
+
position?: number | null,
|
|
1360
|
+
): number;
|
|
1207
1361
|
/* Write a caller-buffer window, or a utf8 string, at the fd's current
|
|
1208
1362
|
* position when position is omitted/null (advancing it), or at a numeric
|
|
1209
1363
|
* byte position without advancing it. Answers the byte count. */
|
|
@@ -1213,8 +1367,19 @@ declare module "node:fs" {
|
|
|
1213
1367
|
position?: number | null;
|
|
1214
1368
|
}
|
|
1215
1369
|
export function writeSync(fd: number, buffer: Uint8Array, options: WriteSyncOptions): number;
|
|
1216
|
-
export function writeSync(
|
|
1217
|
-
|
|
1370
|
+
export function writeSync(
|
|
1371
|
+
fd: number,
|
|
1372
|
+
buffer: Uint8Array,
|
|
1373
|
+
offset?: number,
|
|
1374
|
+
length?: number,
|
|
1375
|
+
position?: number | null,
|
|
1376
|
+
): number;
|
|
1377
|
+
export function writeSync(
|
|
1378
|
+
fd: number,
|
|
1379
|
+
string: string,
|
|
1380
|
+
position?: number | null,
|
|
1381
|
+
encoding?: "utf8" | "utf-8",
|
|
1382
|
+
): number;
|
|
1218
1383
|
/* statSync over an open fd — the same Stats snapshot. */
|
|
1219
1384
|
export function fstatSync(fd: number): Stats;
|
|
1220
1385
|
/* realpath(3) — resolves symlinks, `.`/`..`, throwing Node's fs error
|
|
@@ -1236,14 +1401,40 @@ declare module "node:fs" {
|
|
|
1236
1401
|
}
|
|
1237
1402
|
export interface StatsFs extends StatsFsBase<number> {}
|
|
1238
1403
|
export interface BigIntStatsFs extends StatsFsBase<bigint> {}
|
|
1239
|
-
export interface StatFsOptions {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
export function statfsSync(
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
export function
|
|
1404
|
+
export interface StatFsOptions {
|
|
1405
|
+
bigint?: boolean;
|
|
1406
|
+
}
|
|
1407
|
+
export function statfsSync(
|
|
1408
|
+
path: string | Uint8Array | URL,
|
|
1409
|
+
options?: StatFsOptions & { bigint?: false },
|
|
1410
|
+
): StatsFs;
|
|
1411
|
+
export function statfsSync(
|
|
1412
|
+
path: string | Uint8Array | URL,
|
|
1413
|
+
options: StatFsOptions & { bigint: true },
|
|
1414
|
+
): BigIntStatsFs;
|
|
1415
|
+
export function statfsSync(
|
|
1416
|
+
path: string | Uint8Array | URL,
|
|
1417
|
+
options?: StatFsOptions,
|
|
1418
|
+
): StatsFs | BigIntStatsFs;
|
|
1419
|
+
export function statfs(
|
|
1420
|
+
path: string | Uint8Array | URL,
|
|
1421
|
+
callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void,
|
|
1422
|
+
): void;
|
|
1423
|
+
export function statfs(
|
|
1424
|
+
path: string | Uint8Array | URL,
|
|
1425
|
+
options: (StatFsOptions & { bigint?: false }) | undefined,
|
|
1426
|
+
callback: (err: NodeJS.ErrnoException | null, stats: StatsFs) => void,
|
|
1427
|
+
): void;
|
|
1428
|
+
export function statfs(
|
|
1429
|
+
path: string | Uint8Array | URL,
|
|
1430
|
+
options: StatFsOptions & { bigint: true },
|
|
1431
|
+
callback: (err: NodeJS.ErrnoException | null, stats: BigIntStatsFs) => void,
|
|
1432
|
+
): void;
|
|
1433
|
+
export function statfs(
|
|
1434
|
+
path: string | Uint8Array | URL,
|
|
1435
|
+
options: StatFsOptions | undefined,
|
|
1436
|
+
callback: (err: NodeJS.ErrnoException | null, stats: StatsFs | BigIntStatsFs) => void,
|
|
1437
|
+
): void;
|
|
1247
1438
|
/* fs.watch — the file-watching slice (scr_watch.c, kqueue EVFILT_VNODE):
|
|
1248
1439
|
* "rename"/"change" events on ONE path, watcher.close() to stop. The
|
|
1249
1440
|
* listener takes zero parameters or the eventType string (the filename
|
|
@@ -1318,10 +1509,21 @@ declare module "fs/promises" {
|
|
|
1318
1509
|
truncate(len?: number): Promise<void>;
|
|
1319
1510
|
chmod(mode: number): Promise<void>;
|
|
1320
1511
|
utimes(atime: number | string | Date, mtime: number | string | Date): Promise<void>;
|
|
1321
|
-
readv<T extends Uint8Array[]>(
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1512
|
+
readv<T extends Uint8Array[]>(
|
|
1513
|
+
buffers: T,
|
|
1514
|
+
position?: number | null,
|
|
1515
|
+
): Promise<FileReadvResult<T>>;
|
|
1516
|
+
writev<T extends Uint8Array[]>(
|
|
1517
|
+
buffers: T,
|
|
1518
|
+
position?: number | null,
|
|
1519
|
+
): Promise<FileWritevResult<T>>;
|
|
1520
|
+
read<T extends Uint8Array = Buffer>(
|
|
1521
|
+
options?: FileReadOptions<T> | null,
|
|
1522
|
+
): Promise<FileReadResult<T>>;
|
|
1523
|
+
read<T extends Uint8Array>(
|
|
1524
|
+
buffer: T,
|
|
1525
|
+
options: Omit<FileReadOptions<T>, "buffer">,
|
|
1526
|
+
): Promise<FileReadResult<T>>;
|
|
1325
1527
|
read<T extends Uint8Array>(
|
|
1326
1528
|
buffer: T,
|
|
1327
1529
|
offset?: number | null,
|
|
@@ -1334,8 +1536,15 @@ declare module "fs/promises" {
|
|
|
1334
1536
|
length?: number | null,
|
|
1335
1537
|
position?: number | null,
|
|
1336
1538
|
): Promise<FileWriteResult<T>>;
|
|
1337
|
-
write<T extends Uint8Array>(
|
|
1338
|
-
|
|
1539
|
+
write<T extends Uint8Array>(
|
|
1540
|
+
buffer: T,
|
|
1541
|
+
options: Omit<FileReadOptions<T>, "buffer">,
|
|
1542
|
+
): Promise<FileWriteResult<T>>;
|
|
1543
|
+
write(
|
|
1544
|
+
data: string,
|
|
1545
|
+
position?: number | null,
|
|
1546
|
+
encoding?: "utf8" | "utf-8" | null,
|
|
1547
|
+
): Promise<FileWriteResult<string>>;
|
|
1339
1548
|
readFile(options?: null): Promise<Buffer>;
|
|
1340
1549
|
readFile(encoding: "utf8" | "utf-8"): Promise<string>;
|
|
1341
1550
|
writeFile(data: string | Uint8Array, encoding?: "utf8" | "utf-8" | null): Promise<void>;
|
|
@@ -1344,22 +1553,54 @@ declare module "fs/promises" {
|
|
|
1344
1553
|
[Symbol.asyncDispose](): Promise<void>;
|
|
1345
1554
|
}
|
|
1346
1555
|
export function open(path: string, flags?: string, mode?: number): Promise<FileHandle>;
|
|
1347
|
-
export function link(
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
export function
|
|
1352
|
-
|
|
1353
|
-
|
|
1556
|
+
export function link(
|
|
1557
|
+
existingPath: string | Uint8Array | URL,
|
|
1558
|
+
newPath: string | Uint8Array | URL,
|
|
1559
|
+
): Promise<void>;
|
|
1560
|
+
export function symlink(
|
|
1561
|
+
target: string | Uint8Array | URL,
|
|
1562
|
+
path: string | Uint8Array | URL,
|
|
1563
|
+
type?: string | null,
|
|
1564
|
+
): Promise<void>;
|
|
1565
|
+
export function readlink(
|
|
1566
|
+
path: string | Uint8Array | URL,
|
|
1567
|
+
options: "buffer" | { encoding: "buffer" },
|
|
1568
|
+
): Promise<Buffer>;
|
|
1569
|
+
export function readlink(
|
|
1570
|
+
path: string | Uint8Array | URL,
|
|
1571
|
+
options?: BufferEncoding | { encoding?: BufferEncoding | null } | null,
|
|
1572
|
+
): Promise<string>;
|
|
1573
|
+
export function readlink(
|
|
1574
|
+
path: string | Uint8Array | URL,
|
|
1575
|
+
options: string | { encoding?: string | null } | null,
|
|
1576
|
+
): Promise<string | Buffer>;
|
|
1577
|
+
export function utimes(
|
|
1578
|
+
path: string | Uint8Array | URL,
|
|
1579
|
+
atime: number | string | Date,
|
|
1580
|
+
mtime: number | string | Date,
|
|
1581
|
+
): Promise<void>;
|
|
1582
|
+
export function lutimes(
|
|
1583
|
+
path: string | Uint8Array | URL,
|
|
1584
|
+
atime: number | string | Date,
|
|
1585
|
+
mtime: number | string | Date,
|
|
1586
|
+
): Promise<void>;
|
|
1354
1587
|
export function readFile(path: string, encoding: "utf8" | "utf-8"): Promise<string>;
|
|
1355
1588
|
export function readFile(path: string): Promise<Buffer>;
|
|
1356
1589
|
export function writeFile(
|
|
1357
1590
|
path: string,
|
|
1358
1591
|
data: string,
|
|
1359
|
-
options?: {
|
|
1592
|
+
options?: {
|
|
1593
|
+
mode?: number;
|
|
1594
|
+
encoding?: "utf8" | "utf-8";
|
|
1595
|
+
flag?: string;
|
|
1596
|
+
[option: string]: unknown;
|
|
1597
|
+
},
|
|
1360
1598
|
): Promise<void>;
|
|
1361
1599
|
export function writeFile(path: string, data: string, encoding: "utf8" | "utf-8"): Promise<void>;
|
|
1362
|
-
export function mkdir(
|
|
1600
|
+
export function mkdir(
|
|
1601
|
+
path: string,
|
|
1602
|
+
options?: { recursive?: boolean; mode?: number },
|
|
1603
|
+
): Promise<void>;
|
|
1363
1604
|
export function readdir(path: string): Promise<string[]>;
|
|
1364
1605
|
export function readdir(
|
|
1365
1606
|
path: string,
|
|
@@ -1372,9 +1613,18 @@ declare module "fs/promises" {
|
|
|
1372
1613
|
): Promise<import("node:fs").Dirent[]>;
|
|
1373
1614
|
export function rm(path: string): Promise<void>;
|
|
1374
1615
|
export function stat(path: string): Promise<import("node:fs").Stats>;
|
|
1375
|
-
export function statfs(
|
|
1376
|
-
|
|
1377
|
-
|
|
1616
|
+
export function statfs(
|
|
1617
|
+
path: string | Uint8Array | URL,
|
|
1618
|
+
options?: import("node:fs").StatFsOptions & { bigint?: false },
|
|
1619
|
+
): Promise<import("node:fs").StatsFs>;
|
|
1620
|
+
export function statfs(
|
|
1621
|
+
path: string | Uint8Array | URL,
|
|
1622
|
+
options: import("node:fs").StatFsOptions & { bigint: true },
|
|
1623
|
+
): Promise<import("node:fs").BigIntStatsFs>;
|
|
1624
|
+
export function statfs(
|
|
1625
|
+
path: string | Uint8Array | URL,
|
|
1626
|
+
options?: import("node:fs").StatFsOptions,
|
|
1627
|
+
): Promise<import("node:fs").StatsFs | import("node:fs").BigIntStatsFs>;
|
|
1378
1628
|
export function realpath(path: string): Promise<string>;
|
|
1379
1629
|
export function lstat(path: string): Promise<import("node:fs").Stats>;
|
|
1380
1630
|
export function unlink(path: string): Promise<void>;
|
|
@@ -1597,14 +1847,38 @@ declare module "crypto" {
|
|
|
1597
1847
|
}
|
|
1598
1848
|
export function createHash(algorithm: string): Hash;
|
|
1599
1849
|
export function createHmac(algorithm: string, key: string | Uint8Array): Hmac;
|
|
1600
|
-
export function hash(
|
|
1850
|
+
export function hash(
|
|
1851
|
+
algorithm: string,
|
|
1852
|
+
data: string | Uint8Array,
|
|
1853
|
+
outputEncoding?: "hex" | "base64",
|
|
1854
|
+
): string;
|
|
1601
1855
|
export function timingSafeEqual(a: Uint8Array, b: Uint8Array): boolean;
|
|
1602
|
-
export function randomFillSync<T extends Uint8Array>(
|
|
1856
|
+
export function randomFillSync<T extends Uint8Array>(
|
|
1857
|
+
buffer: T,
|
|
1858
|
+
offset?: number,
|
|
1859
|
+
size?: number,
|
|
1860
|
+
): T;
|
|
1603
1861
|
export function randomInt(max: number): number;
|
|
1604
1862
|
export function randomInt(min: number, max: number): number;
|
|
1605
|
-
export function pbkdf2Sync(
|
|
1606
|
-
|
|
1607
|
-
|
|
1863
|
+
export function pbkdf2Sync(
|
|
1864
|
+
password: string | Uint8Array,
|
|
1865
|
+
salt: string | Uint8Array,
|
|
1866
|
+
iterations: number,
|
|
1867
|
+
keylen: number,
|
|
1868
|
+
digest: string,
|
|
1869
|
+
): Buffer;
|
|
1870
|
+
export function pbkdf2(
|
|
1871
|
+
password: string | Uint8Array,
|
|
1872
|
+
salt: string | Uint8Array,
|
|
1873
|
+
iterations: number,
|
|
1874
|
+
keylen: number,
|
|
1875
|
+
digest: string,
|
|
1876
|
+
callback: (error: Error | null, derivedKey: Buffer) => void,
|
|
1877
|
+
): void;
|
|
1878
|
+
export function randomBytes(
|
|
1879
|
+
size: number,
|
|
1880
|
+
callback: (error: Error | null, buffer: Buffer) => void,
|
|
1881
|
+
): void;
|
|
1608
1882
|
export type BinaryLike = string | ArrayBuffer | ArrayBufferView;
|
|
1609
1883
|
export interface ScryptOptions {
|
|
1610
1884
|
N?: number;
|
|
@@ -1615,11 +1889,40 @@ declare module "crypto" {
|
|
|
1615
1889
|
parallelization?: number;
|
|
1616
1890
|
maxmem?: number;
|
|
1617
1891
|
}
|
|
1618
|
-
export function scryptSync(
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1892
|
+
export function scryptSync(
|
|
1893
|
+
password: BinaryLike,
|
|
1894
|
+
salt: BinaryLike,
|
|
1895
|
+
keylen: number,
|
|
1896
|
+
options?: ScryptOptions,
|
|
1897
|
+
): Buffer;
|
|
1898
|
+
export function scrypt(
|
|
1899
|
+
password: BinaryLike,
|
|
1900
|
+
salt: BinaryLike,
|
|
1901
|
+
keylen: number,
|
|
1902
|
+
callback: (error: Error | null, derivedKey: Buffer) => void,
|
|
1903
|
+
): void;
|
|
1904
|
+
export function scrypt(
|
|
1905
|
+
password: BinaryLike,
|
|
1906
|
+
salt: BinaryLike,
|
|
1907
|
+
keylen: number,
|
|
1908
|
+
options: ScryptOptions,
|
|
1909
|
+
callback: (error: Error | null, derivedKey: Buffer) => void,
|
|
1910
|
+
): void;
|
|
1911
|
+
export function hkdfSync(
|
|
1912
|
+
digest: string,
|
|
1913
|
+
ikm: BinaryLike,
|
|
1914
|
+
salt: BinaryLike,
|
|
1915
|
+
info: BinaryLike,
|
|
1916
|
+
keylen: number,
|
|
1917
|
+
): ArrayBuffer;
|
|
1918
|
+
export function hkdf(
|
|
1919
|
+
digest: string,
|
|
1920
|
+
ikm: BinaryLike,
|
|
1921
|
+
salt: BinaryLike,
|
|
1922
|
+
info: BinaryLike,
|
|
1923
|
+
keylen: number,
|
|
1924
|
+
callback: (error: Error | null, derivedKey: ArrayBuffer) => void,
|
|
1925
|
+
): void;
|
|
1623
1926
|
/* The lowered X509Certificate surface is the data-record slice:
|
|
1624
1927
|
* fingerprint (the SHA-1 of the DER, uppercase colon-separated) and
|
|
1625
1928
|
* the validFrom/validTo validity window (Node's ASN1_TIME_print
|
|
@@ -1817,21 +2120,21 @@ declare module "child_process" {
|
|
|
1817
2120
|
readonly stderr: NodeJS.ReadableStream | null;
|
|
1818
2121
|
}
|
|
1819
2122
|
export interface SpawnOptions {
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
2123
|
+
/* The 3-tuple form admits number fds in the stdout/stderr slots —
|
|
2124
|
+
* openSync results dup2'd into the child (the daemon-log idiom
|
|
2125
|
+
* ["ignore", logFd, logFd]) — and "pipe" there too (child.stdout/
|
|
2126
|
+
* child.stderr streams); "pipe" in the stdin slot exposes
|
|
2127
|
+
* child.stdin. */
|
|
2128
|
+
stdio?: "ignore" | "inherit" | "pipe" | ("ignore" | "inherit" | "pipe" | number)[];
|
|
2129
|
+
/* detached gives the child its own session and process group
|
|
2130
|
+
* (POSIX_SPAWN_SETSID); env REPLACES the child environment; cwd
|
|
2131
|
+
* sets its working directory; windowsHide is a POSIX no-op; shell
|
|
2132
|
+
* runs the complete command string through /bin/sh or cmd.exe. */
|
|
2133
|
+
detached?: boolean;
|
|
2134
|
+
env?: { [k: string]: string | undefined };
|
|
2135
|
+
cwd?: string;
|
|
2136
|
+
windowsHide?: boolean;
|
|
2137
|
+
shell?: boolean;
|
|
1835
2138
|
}
|
|
1836
2139
|
export function spawn(command: string, args?: string[], options?: SpawnOptions): ChildProcess;
|
|
1837
2140
|
export function spawn(command: string, options?: SpawnOptions): ChildProcess;
|
|
@@ -1896,8 +2199,17 @@ declare module "child_process" {
|
|
|
1896
2199
|
* stdout/stderr. The no-callback overload remains for util.promisify's
|
|
1897
2200
|
* static target recognition; reached no-callback calls still fence. */
|
|
1898
2201
|
export function execFile(file: string, callback: ExecFileCallback): ChildProcess;
|
|
1899
|
-
export function execFile(
|
|
1900
|
-
|
|
2202
|
+
export function execFile(
|
|
2203
|
+
file: string,
|
|
2204
|
+
args: string[] | null,
|
|
2205
|
+
callback: ExecFileCallback,
|
|
2206
|
+
): ChildProcess;
|
|
2207
|
+
export function execFile(
|
|
2208
|
+
file: string,
|
|
2209
|
+
args: string[] | null,
|
|
2210
|
+
options: ExecSyncOptions,
|
|
2211
|
+
callback: ExecFileCallback,
|
|
2212
|
+
): ChildProcess;
|
|
1901
2213
|
export function execFile(
|
|
1902
2214
|
file: string,
|
|
1903
2215
|
args?: string[] | null,
|
|
@@ -1928,7 +2240,11 @@ declare module "util" {
|
|
|
1928
2240
|
export function stripVTControlCharacters(str: string): string;
|
|
1929
2241
|
export function toUSVString(string: string): string;
|
|
1930
2242
|
export function isDeepStrictEqual(val1: unknown, val2: unknown, skipPrototype?: boolean): boolean;
|
|
1931
|
-
export function styleText(
|
|
2243
|
+
export function styleText(
|
|
2244
|
+
format: string | readonly string[],
|
|
2245
|
+
text: string,
|
|
2246
|
+
options?: { validateStream?: boolean; stream?: unknown },
|
|
2247
|
+
): string;
|
|
1932
2248
|
export function parseEnv(content: string): { [key: string]: string | undefined };
|
|
1933
2249
|
export type TextEncoder = globalThis.TextEncoder;
|
|
1934
2250
|
export type TextDecoder = globalThis.TextDecoder;
|
|
@@ -1956,7 +2272,10 @@ declare module "util" {
|
|
|
1956
2272
|
* story: guarded/diagnostic-path code must TYPECHECK; a reached use
|
|
1957
2273
|
* without a lowering fences at its site). inspect's options carry the
|
|
1958
2274
|
* documented knobs through an index signature. */
|
|
1959
|
-
export function inspect(
|
|
2275
|
+
export function inspect(
|
|
2276
|
+
object: unknown,
|
|
2277
|
+
options?: { depth?: number | null; colors?: boolean; [k: string]: unknown },
|
|
2278
|
+
): string;
|
|
1960
2279
|
export function format(format?: unknown, ...args: unknown[]): string;
|
|
1961
2280
|
export function formatWithOptions(
|
|
1962
2281
|
inspectOptions: { depth?: number | null; colors?: boolean; [k: string]: unknown },
|
|
@@ -2141,8 +2460,20 @@ declare module "node:test" {
|
|
|
2141
2460
|
function run(options?: unknown): unknown;
|
|
2142
2461
|
function snapshot(...args: unknown[]): unknown;
|
|
2143
2462
|
export {
|
|
2144
|
-
test,
|
|
2145
|
-
|
|
2463
|
+
test,
|
|
2464
|
+
it,
|
|
2465
|
+
describe,
|
|
2466
|
+
suite,
|
|
2467
|
+
before,
|
|
2468
|
+
after,
|
|
2469
|
+
beforeEach,
|
|
2470
|
+
afterEach,
|
|
2471
|
+
mock,
|
|
2472
|
+
assert,
|
|
2473
|
+
run,
|
|
2474
|
+
snapshot,
|
|
2475
|
+
TestContext,
|
|
2476
|
+
TestOptions,
|
|
2146
2477
|
};
|
|
2147
2478
|
export default test;
|
|
2148
2479
|
}
|
|
@@ -2162,8 +2493,16 @@ declare module "assert" {
|
|
|
2162
2493
|
function fail(message?: string): never;
|
|
2163
2494
|
function throws(fn: () => unknown, expected?: unknown, message?: string): void;
|
|
2164
2495
|
function doesNotThrow(fn: () => unknown, expected?: unknown, message?: string): void;
|
|
2165
|
-
function rejects(
|
|
2166
|
-
|
|
2496
|
+
function rejects(
|
|
2497
|
+
fn: (() => Promise<unknown>) | Promise<unknown>,
|
|
2498
|
+
expected?: unknown,
|
|
2499
|
+
message?: string,
|
|
2500
|
+
): Promise<void>;
|
|
2501
|
+
function doesNotReject(
|
|
2502
|
+
fn: (() => Promise<unknown>) | Promise<unknown>,
|
|
2503
|
+
expected?: unknown,
|
|
2504
|
+
message?: string,
|
|
2505
|
+
): Promise<void>;
|
|
2167
2506
|
function match(value: string, regExp: RegExp, message?: string): void;
|
|
2168
2507
|
function doesNotMatch(value: string, regExp: RegExp, message?: string): void;
|
|
2169
2508
|
function ifError(value: unknown): void;
|
|
@@ -2193,8 +2532,16 @@ declare module "assert/strict" {
|
|
|
2193
2532
|
function fail(message?: string): never;
|
|
2194
2533
|
function throws(fn: () => unknown, expected?: unknown, message?: string): void;
|
|
2195
2534
|
function doesNotThrow(fn: () => unknown, expected?: unknown, message?: string): void;
|
|
2196
|
-
function rejects(
|
|
2197
|
-
|
|
2535
|
+
function rejects(
|
|
2536
|
+
fn: (() => Promise<unknown>) | Promise<unknown>,
|
|
2537
|
+
expected?: unknown,
|
|
2538
|
+
message?: string,
|
|
2539
|
+
): Promise<void>;
|
|
2540
|
+
function doesNotReject(
|
|
2541
|
+
fn: (() => Promise<unknown>) | Promise<unknown>,
|
|
2542
|
+
expected?: unknown,
|
|
2543
|
+
message?: string,
|
|
2544
|
+
): Promise<void>;
|
|
2198
2545
|
function match(value: string, regExp: RegExp, message?: string): void;
|
|
2199
2546
|
function doesNotMatch(value: string, regExp: RegExp, message?: string): void;
|
|
2200
2547
|
function ifError(value: unknown): void;
|
|
@@ -2260,8 +2607,18 @@ declare module "querystring" {
|
|
|
2260
2607
|
| null
|
|
2261
2608
|
| undefined;
|
|
2262
2609
|
}
|
|
2263
|
-
export function parse(
|
|
2264
|
-
|
|
2610
|
+
export function parse(
|
|
2611
|
+
str: string,
|
|
2612
|
+
sep?: string | null,
|
|
2613
|
+
eq?: string | null,
|
|
2614
|
+
options?: ParseOptions,
|
|
2615
|
+
): ParsedUrlQuery;
|
|
2616
|
+
export function stringify(
|
|
2617
|
+
obj?: ParsedUrlQueryInput,
|
|
2618
|
+
sep?: string | null,
|
|
2619
|
+
eq?: string | null,
|
|
2620
|
+
options?: StringifyOptions,
|
|
2621
|
+
): string;
|
|
2265
2622
|
export const decode: typeof parse;
|
|
2266
2623
|
export const encode: typeof stringify;
|
|
2267
2624
|
export function escape(str: string): string;
|
|
@@ -2308,28 +2665,58 @@ declare module "node:readline" {
|
|
|
2308
2665
|
* declared so reached uses receive a named SC2020 refusal; Brotli,
|
|
2309
2666
|
* streaming, and Zstd remain outside the lowered surface. */
|
|
2310
2667
|
declare module "zlib" {
|
|
2311
|
-
export interface ZlibOptions {
|
|
2668
|
+
export interface ZlibOptions {
|
|
2669
|
+
[option: string]: unknown;
|
|
2670
|
+
}
|
|
2312
2671
|
export type ZlibCallback = (error: NodeJS.ErrnoException | null, result: Buffer) => void;
|
|
2313
2672
|
export function deflate(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2314
|
-
export function deflate(
|
|
2673
|
+
export function deflate(
|
|
2674
|
+
data: string | Uint8Array,
|
|
2675
|
+
options: ZlibOptions,
|
|
2676
|
+
callback: ZlibCallback,
|
|
2677
|
+
): void;
|
|
2315
2678
|
export function deflateSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2316
2679
|
export function inflate(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2317
|
-
export function inflate(
|
|
2680
|
+
export function inflate(
|
|
2681
|
+
data: string | Uint8Array,
|
|
2682
|
+
options: ZlibOptions,
|
|
2683
|
+
callback: ZlibCallback,
|
|
2684
|
+
): void;
|
|
2318
2685
|
export function inflateSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2319
2686
|
export function deflateRaw(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2320
|
-
export function deflateRaw(
|
|
2687
|
+
export function deflateRaw(
|
|
2688
|
+
data: string | Uint8Array,
|
|
2689
|
+
options: ZlibOptions,
|
|
2690
|
+
callback: ZlibCallback,
|
|
2691
|
+
): void;
|
|
2321
2692
|
export function deflateRawSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2322
2693
|
export function inflateRaw(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2323
|
-
export function inflateRaw(
|
|
2694
|
+
export function inflateRaw(
|
|
2695
|
+
data: string | Uint8Array,
|
|
2696
|
+
options: ZlibOptions,
|
|
2697
|
+
callback: ZlibCallback,
|
|
2698
|
+
): void;
|
|
2324
2699
|
export function inflateRawSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2325
2700
|
export function gzip(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2326
|
-
export function gzip(
|
|
2701
|
+
export function gzip(
|
|
2702
|
+
data: string | Uint8Array,
|
|
2703
|
+
options: ZlibOptions,
|
|
2704
|
+
callback: ZlibCallback,
|
|
2705
|
+
): void;
|
|
2327
2706
|
export function gzipSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2328
2707
|
export function gunzip(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2329
|
-
export function gunzip(
|
|
2708
|
+
export function gunzip(
|
|
2709
|
+
data: string | Uint8Array,
|
|
2710
|
+
options: ZlibOptions,
|
|
2711
|
+
callback: ZlibCallback,
|
|
2712
|
+
): void;
|
|
2330
2713
|
export function gunzipSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2331
2714
|
export function unzip(data: string | Uint8Array, callback: ZlibCallback): void;
|
|
2332
|
-
export function unzip(
|
|
2715
|
+
export function unzip(
|
|
2716
|
+
data: string | Uint8Array,
|
|
2717
|
+
options: ZlibOptions,
|
|
2718
|
+
callback: ZlibCallback,
|
|
2719
|
+
): void;
|
|
2333
2720
|
export function unzipSync(data: string | Uint8Array, options?: ZlibOptions): Buffer;
|
|
2334
2721
|
export function crc32(data: string | Uint8Array, value?: number): number;
|
|
2335
2722
|
export function brotliCompressSync(data: string | Uint8Array): Buffer;
|
|
@@ -2381,7 +2768,9 @@ declare module "net" {
|
|
|
2381
2768
|
setEncoding(encoding: string): void;
|
|
2382
2769
|
/* socket→socket, and socket→response (the extended-CONNECT bridge
|
|
2383
2770
|
* leg: raw chunks become response body writes; EOF ends it). */
|
|
2384
|
-
pipe(
|
|
2771
|
+
pipe(
|
|
2772
|
+
destination: Socket | import("http").ServerResponse | import("http2").Http2ServerResponse,
|
|
2773
|
+
): void;
|
|
2385
2774
|
setTimeout(ms: number): void;
|
|
2386
2775
|
/* The paused-mode demux surface: once('readable') + read(1) +
|
|
2387
2776
|
* unshift — read answers exactly n buffered bytes or null. */
|
|
@@ -2393,16 +2782,25 @@ declare module "net" {
|
|
|
2393
2782
|
* registration never fires — Node's exact split. 'session' fires
|
|
2394
2783
|
* once with the serialized session (the received-ticket event). */
|
|
2395
2784
|
on(event: "data", listener: (chunk: Buffer) => void): void;
|
|
2396
|
-
on(
|
|
2785
|
+
on(
|
|
2786
|
+
event: "end" | "close" | "connect" | "timeout" | "readable" | "finish" | "secureConnect",
|
|
2787
|
+
listener: () => void,
|
|
2788
|
+
): void;
|
|
2397
2789
|
on(event: "error", listener: (err: Error) => void): void;
|
|
2398
2790
|
on(event: "session", listener: (session: Buffer) => void): void;
|
|
2399
2791
|
/* addListener IS on (Node aliases them) — the suite spells both. */
|
|
2400
2792
|
addListener(event: "data", listener: (chunk: Buffer) => void): void;
|
|
2401
|
-
addListener(
|
|
2793
|
+
addListener(
|
|
2794
|
+
event: "end" | "close" | "connect" | "timeout" | "readable" | "finish" | "secureConnect",
|
|
2795
|
+
listener: () => void,
|
|
2796
|
+
): void;
|
|
2402
2797
|
addListener(event: "error", listener: (err: Error) => void): void;
|
|
2403
2798
|
addListener(event: "session", listener: (session: Buffer) => void): void;
|
|
2404
2799
|
once(event: "data", listener: (chunk: Buffer) => void): void;
|
|
2405
|
-
once(
|
|
2800
|
+
once(
|
|
2801
|
+
event: "end" | "close" | "connect" | "timeout" | "readable" | "finish" | "secureConnect",
|
|
2802
|
+
listener: () => void,
|
|
2803
|
+
): void;
|
|
2406
2804
|
once(event: "error", listener: (err: Error) => void): void;
|
|
2407
2805
|
once(event: "session", listener: (session: Buffer) => void): void;
|
|
2408
2806
|
}
|
|
@@ -2416,7 +2814,10 @@ declare module "net" {
|
|
|
2416
2814
|
/* The explicit-interface bind: host is an IP literal (absent = the
|
|
2417
2815
|
* host-less dual-stack any); ipv6Only sets IPV6_V6ONLY and reusePort
|
|
2418
2816
|
* requests kernel connection distribution where Node supports it. */
|
|
2419
|
-
listen(
|
|
2817
|
+
listen(
|
|
2818
|
+
options: { port: number; host?: string; ipv6Only?: boolean; reusePort?: boolean },
|
|
2819
|
+
callback?: () => void,
|
|
2820
|
+
): Server;
|
|
2420
2821
|
close(callback?: () => void): void;
|
|
2421
2822
|
/* The bound AddressInfo (Node answers null before listen — this
|
|
2422
2823
|
* surface answers the record with port 0 there, the serverPort
|
|
@@ -2430,23 +2831,41 @@ declare module "net" {
|
|
|
2430
2831
|
on(event: "error", listener: (err: Error) => void): void;
|
|
2431
2832
|
/* The WebSocket handover: fires INSTEAD of 'request' for
|
|
2432
2833
|
* Connection: upgrade requests, with the raw socket + head bytes. */
|
|
2433
|
-
on(
|
|
2834
|
+
on(
|
|
2835
|
+
event: "upgrade",
|
|
2836
|
+
listener: (req: import("http").IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
2837
|
+
): void;
|
|
2434
2838
|
/* http.createServer(handler)'s event twin (a no-parser net server
|
|
2435
2839
|
* never fires it, like Node). */
|
|
2436
|
-
on(
|
|
2840
|
+
on(
|
|
2841
|
+
event: "request",
|
|
2842
|
+
listener: (req: import("http").IncomingMessage, res: import("http").ServerResponse) => void,
|
|
2843
|
+
): void;
|
|
2437
2844
|
/* addListener IS on (Node aliases them) — the suite spells both. */
|
|
2438
2845
|
addListener(event: "connection" | "secureConnection", listener: (socket: Socket) => void): void;
|
|
2439
2846
|
addListener(event: "close" | "listening", listener: () => void): void;
|
|
2440
2847
|
addListener(event: "timeout", listener: (socket: Socket) => void): void;
|
|
2441
2848
|
addListener(event: "error", listener: (err: Error) => void): void;
|
|
2442
|
-
addListener(
|
|
2443
|
-
|
|
2849
|
+
addListener(
|
|
2850
|
+
event: "upgrade",
|
|
2851
|
+
listener: (req: import("http").IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
2852
|
+
): void;
|
|
2853
|
+
addListener(
|
|
2854
|
+
event: "request",
|
|
2855
|
+
listener: (req: import("http").IncomingMessage, res: import("http").ServerResponse) => void,
|
|
2856
|
+
): void;
|
|
2444
2857
|
once(event: "connection" | "secureConnection", listener: (socket: Socket) => void): void;
|
|
2445
2858
|
once(event: "close" | "listening", listener: () => void): void;
|
|
2446
2859
|
once(event: "timeout", listener: (socket: Socket) => void): void;
|
|
2447
2860
|
once(event: "error", listener: (err: Error) => void): void;
|
|
2448
|
-
once(
|
|
2449
|
-
|
|
2861
|
+
once(
|
|
2862
|
+
event: "upgrade",
|
|
2863
|
+
listener: (req: import("http").IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
2864
|
+
): void;
|
|
2865
|
+
once(
|
|
2866
|
+
event: "request",
|
|
2867
|
+
listener: (req: import("http").IncomingMessage, res: import("http").ServerResponse) => void,
|
|
2868
|
+
): void;
|
|
2450
2869
|
}
|
|
2451
2870
|
/* The Socket VALUE — the `x instanceof net.Socket` narrowing target
|
|
2452
2871
|
* (the h2 compat 'connect' listener's test). Constructing bare sockets
|
|
@@ -2454,27 +2873,40 @@ declare module "net" {
|
|
|
2454
2873
|
export const Socket: abstract new () => Socket;
|
|
2455
2874
|
export function createServer(connectionListener?: (socket: Socket) => void): Server;
|
|
2456
2875
|
export function connect(port: number, host?: string, connectListener?: () => void): Socket;
|
|
2457
|
-
export function createConnection(
|
|
2876
|
+
export function createConnection(
|
|
2877
|
+
port: number,
|
|
2878
|
+
host?: string,
|
|
2879
|
+
connectListener?: () => void,
|
|
2880
|
+
): Socket;
|
|
2458
2881
|
/* The caller-resolver dial (@types/node's net.LookupFunction, narrowed
|
|
2459
2882
|
* to the lowered shape): the runtime invokes it as Node does and dials
|
|
2460
2883
|
* the answered addresses in order under autoSelectFamily: true. */
|
|
2461
2884
|
export type LookupFunction = (
|
|
2462
2885
|
hostname: string,
|
|
2463
2886
|
options: unknown,
|
|
2464
|
-
callback: (
|
|
2887
|
+
callback: (
|
|
2888
|
+
err: NodeJS.ErrnoException | null,
|
|
2889
|
+
addresses: { address: string; family: number }[],
|
|
2890
|
+
) => void,
|
|
2465
2891
|
) => void;
|
|
2466
|
-
export function connect(
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2892
|
+
export function connect(
|
|
2893
|
+
options: {
|
|
2894
|
+
port: number;
|
|
2895
|
+
host?: string;
|
|
2896
|
+
autoSelectFamily?: boolean;
|
|
2897
|
+
lookup?: LookupFunction;
|
|
2898
|
+
},
|
|
2899
|
+
connectListener?: () => void,
|
|
2900
|
+
): Socket;
|
|
2901
|
+
export function createConnection(
|
|
2902
|
+
options: {
|
|
2903
|
+
port: number;
|
|
2904
|
+
host?: string;
|
|
2905
|
+
autoSelectFamily?: boolean;
|
|
2906
|
+
lookup?: LookupFunction;
|
|
2907
|
+
},
|
|
2908
|
+
connectListener?: () => void,
|
|
2909
|
+
): Socket;
|
|
2478
2910
|
/* The happy-eyeballs attempt budget (Node's process-wide knob; the
|
|
2479
2911
|
* autoSelectFamily dial consults it): one runtime int, default 250ms
|
|
2480
2912
|
* like Node's. */
|
|
@@ -2513,16 +2945,21 @@ declare module "http" {
|
|
|
2513
2945
|
headersTimeout: number;
|
|
2514
2946
|
requestTimeout: number;
|
|
2515
2947
|
}
|
|
2516
|
-
export type RequestListener =
|
|
2517
|
-
(req: IncomingMessage, res: ServerResponse) => void;
|
|
2948
|
+
export type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
|
|
2518
2949
|
/* The Server VALUE — Node's constructor works with and without `new`
|
|
2519
2950
|
* (test/parallel's http.Server(fn) spelling); both route to the
|
|
2520
2951
|
* createServer lowering. */
|
|
2521
2952
|
export const Server: {
|
|
2522
2953
|
new (requestListener?: (req: IncomingMessage, res: ServerResponse) => void): Server;
|
|
2523
|
-
new (
|
|
2954
|
+
new (
|
|
2955
|
+
options: ServerOptions,
|
|
2956
|
+
requestListener?: (req: IncomingMessage, res: ServerResponse) => void,
|
|
2957
|
+
): Server;
|
|
2524
2958
|
(requestListener?: (req: IncomingMessage, res: ServerResponse) => void): Server;
|
|
2525
|
-
(
|
|
2959
|
+
(
|
|
2960
|
+
options: ServerOptions,
|
|
2961
|
+
requestListener?: (req: IncomingMessage, res: ServerResponse) => void,
|
|
2962
|
+
): Server;
|
|
2526
2963
|
};
|
|
2527
2964
|
/* The options-record stance (the RequestOptions precedent): every
|
|
2528
2965
|
* documented key typechecks; the lowering's option walk decides per
|
|
@@ -2566,7 +3003,9 @@ declare module "http" {
|
|
|
2566
3003
|
setEncoding(encoding: string): void;
|
|
2567
3004
|
/* The proxy legs: the body streams into a ServerResponse, a
|
|
2568
3005
|
* ClientRequest, or a raw Socket; natural end ends the destination. */
|
|
2569
|
-
pipe(
|
|
3006
|
+
pipe(
|
|
3007
|
+
destination: ServerResponse | import("http2").Http2ServerResponse | ClientRequest | Socket,
|
|
3008
|
+
): void;
|
|
2570
3009
|
on(event: "data", listener: (chunk: any) => void): void;
|
|
2571
3010
|
on(event: "end" | "close" | "aborted", listener: () => void): void;
|
|
2572
3011
|
on(event: "error", listener: (err: Error) => void): void;
|
|
@@ -2602,7 +3041,11 @@ declare module "http" {
|
|
|
2602
3041
|
/* Both overloads answer the response (`return this` chaining); the
|
|
2603
3042
|
* headers argument also takes Node's flat [name, value, ...] array. */
|
|
2604
3043
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders | string[]): ServerResponse;
|
|
2605
|
-
writeHead(
|
|
3044
|
+
writeHead(
|
|
3045
|
+
statusCode: number,
|
|
3046
|
+
statusMessage: string,
|
|
3047
|
+
headers?: OutgoingHttpHeaders | string[],
|
|
3048
|
+
): ServerResponse;
|
|
2606
3049
|
writeContinue(callback?: () => void): void;
|
|
2607
3050
|
writeProcessing(callback?: () => void): void;
|
|
2608
3051
|
writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
|
|
@@ -2670,7 +3113,14 @@ declare module "http" {
|
|
|
2670
3113
|
constructor(options?: AgentOptions);
|
|
2671
3114
|
destroy(): void;
|
|
2672
3115
|
/* Node's exact key shape: host:port:localAddress[:family][:socketPath]. */
|
|
2673
|
-
getName(options?: {
|
|
3116
|
+
getName(options?: {
|
|
3117
|
+
host?: string;
|
|
3118
|
+
port?: number;
|
|
3119
|
+
localAddress?: string;
|
|
3120
|
+
family?: number;
|
|
3121
|
+
socketPath?: string;
|
|
3122
|
+
[option: string]: unknown;
|
|
3123
|
+
}): string;
|
|
2674
3124
|
maxSockets: number;
|
|
2675
3125
|
maxFreeSockets: number;
|
|
2676
3126
|
keepAliveMsecs: number;
|
|
@@ -2720,18 +3170,27 @@ declare module "http" {
|
|
|
2720
3170
|
abort(): void;
|
|
2721
3171
|
on(event: "response", listener: (res: IncomingMessage) => void): void;
|
|
2722
3172
|
on(event: "socket", listener: (socket: Socket) => void): void;
|
|
2723
|
-
on(
|
|
3173
|
+
on(
|
|
3174
|
+
event: "upgrade",
|
|
3175
|
+
listener: (res: IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
3176
|
+
): void;
|
|
2724
3177
|
on(event: "timeout" | "close" | "finish" | "abort", listener: () => void): void;
|
|
2725
3178
|
on(event: "error", listener: (err: Error) => void): void;
|
|
2726
3179
|
/* addListener IS on (Node aliases them) — the suite spells both. */
|
|
2727
3180
|
addListener(event: "response", listener: (res: IncomingMessage) => void): void;
|
|
2728
3181
|
addListener(event: "socket", listener: (socket: Socket) => void): void;
|
|
2729
|
-
addListener(
|
|
3182
|
+
addListener(
|
|
3183
|
+
event: "upgrade",
|
|
3184
|
+
listener: (res: IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
3185
|
+
): void;
|
|
2730
3186
|
addListener(event: "timeout" | "close" | "finish" | "abort", listener: () => void): void;
|
|
2731
3187
|
addListener(event: "error", listener: (err: Error) => void): void;
|
|
2732
3188
|
once(event: "response", listener: (res: IncomingMessage) => void): void;
|
|
2733
3189
|
once(event: "socket", listener: (socket: Socket) => void): void;
|
|
2734
|
-
once(
|
|
3190
|
+
once(
|
|
3191
|
+
event: "upgrade",
|
|
3192
|
+
listener: (res: IncomingMessage, socket: Socket, head: Buffer) => void,
|
|
3193
|
+
): void;
|
|
2735
3194
|
once(event: "timeout" | "close" | "finish" | "abort", listener: () => void): void;
|
|
2736
3195
|
once(event: "error", listener: (err: Error) => void): void;
|
|
2737
3196
|
}
|
|
@@ -2818,9 +3277,21 @@ declare module "tls" {
|
|
|
2818
3277
|
servername?: string;
|
|
2819
3278
|
[option: string]: unknown;
|
|
2820
3279
|
}
|
|
2821
|
-
export function connect(
|
|
2822
|
-
|
|
2823
|
-
|
|
3280
|
+
export function connect(
|
|
3281
|
+
options: ConnectionOptions,
|
|
3282
|
+
secureConnectListener?: () => void,
|
|
3283
|
+
): TLSSocket;
|
|
3284
|
+
export function connect(
|
|
3285
|
+
port: number,
|
|
3286
|
+
options?: ConnectionOptions,
|
|
3287
|
+
secureConnectListener?: () => void,
|
|
3288
|
+
): TLSSocket;
|
|
3289
|
+
export function connect(
|
|
3290
|
+
port: number,
|
|
3291
|
+
host?: string,
|
|
3292
|
+
options?: ConnectionOptions,
|
|
3293
|
+
secureConnectListener?: () => void,
|
|
3294
|
+
): TLSSocket;
|
|
2824
3295
|
/** An opaque parsed cert/key pair — what an SNI callback answers with
|
|
2825
3296
|
* (the value is a runtime handle; the members are runtime-internal). */
|
|
2826
3297
|
export interface SecureContext {}
|
|
@@ -2951,15 +3422,24 @@ declare module "http2" {
|
|
|
2951
3422
|
getHeaders(): import("http").OutgoingHttpHeaders;
|
|
2952
3423
|
hasHeader(name: string): boolean;
|
|
2953
3424
|
removeHeader(name: string): void;
|
|
2954
|
-
writeHead(
|
|
2955
|
-
|
|
3425
|
+
writeHead(
|
|
3426
|
+
statusCode: number,
|
|
3427
|
+
headers?: import("http").OutgoingHttpHeaders | string[],
|
|
3428
|
+
): Http2ServerResponse;
|
|
3429
|
+
writeHead(
|
|
3430
|
+
statusCode: number,
|
|
3431
|
+
statusMessage: string,
|
|
3432
|
+
headers?: import("http").OutgoingHttpHeaders | string[],
|
|
3433
|
+
): Http2ServerResponse;
|
|
2956
3434
|
writeContinue(): void;
|
|
2957
3435
|
writeEarlyHints(hints: Record<string, string | string[]>): void;
|
|
2958
3436
|
write(data: string | Uint8Array): void;
|
|
2959
3437
|
flushHeaders(): void;
|
|
2960
3438
|
cork(): void;
|
|
2961
3439
|
uncork(): void;
|
|
2962
|
-
addTrailers(
|
|
3440
|
+
addTrailers(
|
|
3441
|
+
headers: import("http").OutgoingHttpHeaders | ReadonlyArray<[string, string]>,
|
|
3442
|
+
): void;
|
|
2963
3443
|
end(data?: string | Uint8Array, callback?: () => void): void;
|
|
2964
3444
|
end(callback: () => void): void;
|
|
2965
3445
|
destroy(): void;
|
|
@@ -2979,23 +3459,41 @@ declare module "http2" {
|
|
|
2979
3459
|
address(): import("node:dgram").AddressInfo;
|
|
2980
3460
|
emit(event: "connection", socket: Socket): void;
|
|
2981
3461
|
on(event: "connection", listener: (socket: Socket) => void): void;
|
|
2982
|
-
on(
|
|
3462
|
+
on(
|
|
3463
|
+
event: "request",
|
|
3464
|
+
listener: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
3465
|
+
): void;
|
|
2983
3466
|
on(event: "error", listener: (err: Error) => void): void;
|
|
2984
3467
|
on(event: "close", listener: () => void): void;
|
|
2985
3468
|
on(event: "sessionError", listener: (err: Error, session: ServerHttp2Session) => void): void;
|
|
2986
3469
|
/* The ALPN=h2 server's surface (createSecureServer WITHOUT
|
|
2987
3470
|
* allowHTTP1 — the real h2-over-TLS stack): per-stream and
|
|
2988
3471
|
* per-session listeners, exactly the h2c server's. */
|
|
2989
|
-
on(
|
|
3472
|
+
on(
|
|
3473
|
+
event: "stream",
|
|
3474
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
3475
|
+
): void;
|
|
2990
3476
|
on(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
2991
|
-
once(
|
|
3477
|
+
once(
|
|
3478
|
+
event: "stream",
|
|
3479
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
3480
|
+
): void;
|
|
2992
3481
|
once(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
2993
3482
|
/* HTTP CONNECT (and, in Node, the h2 extended CONNECT — which the
|
|
2994
3483
|
* allowHTTP1 lowering never sees): the second argument is the raw
|
|
2995
3484
|
* socket on HTTP/1.1 connections; narrow with instanceof. */
|
|
2996
|
-
on(
|
|
3485
|
+
on(
|
|
3486
|
+
event: "connect",
|
|
3487
|
+
listener: (
|
|
3488
|
+
req: Http2ServerRequest | import("http").IncomingMessage,
|
|
3489
|
+
resOrSocket: Http2ServerResponse | Socket,
|
|
3490
|
+
) => void,
|
|
3491
|
+
): void;
|
|
2997
3492
|
once(event: "connection", listener: (socket: Socket) => void): void;
|
|
2998
|
-
once(
|
|
3493
|
+
once(
|
|
3494
|
+
event: "request",
|
|
3495
|
+
listener: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
3496
|
+
): void;
|
|
2999
3497
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3000
3498
|
once(event: "close", listener: () => void): void;
|
|
3001
3499
|
}
|
|
@@ -3265,7 +3763,10 @@ declare module "http2" {
|
|
|
3265
3763
|
* the ALPN=h2 server's compat handles over streams). */
|
|
3266
3764
|
export function createSecureServer(
|
|
3267
3765
|
options: SecureServerOptions,
|
|
3268
|
-
onRequestHandler?: (
|
|
3766
|
+
onRequestHandler?: (
|
|
3767
|
+
req: import("http").IncomingMessage,
|
|
3768
|
+
res: import("http").ServerResponse,
|
|
3769
|
+
) => void,
|
|
3269
3770
|
): Http2SecureServer;
|
|
3270
3771
|
|
|
3271
3772
|
/* ── the REAL h2c surface (scr_http2.c: frame codec + HPACK over the
|
|
@@ -3306,22 +3807,49 @@ declare module "http2" {
|
|
|
3306
3807
|
goaway(code?: number, lastStreamID?: number, opaqueData?: Uint8Array): void;
|
|
3307
3808
|
on(event: "close" | "timeout", listener: () => void): void;
|
|
3308
3809
|
on(event: "error", listener: (err: Error) => void): void;
|
|
3309
|
-
on(
|
|
3310
|
-
|
|
3311
|
-
|
|
3810
|
+
on(
|
|
3811
|
+
event: "connect",
|
|
3812
|
+
listener: (session: Http2Session, socket: import("net").Socket) => void,
|
|
3813
|
+
): void;
|
|
3814
|
+
on(
|
|
3815
|
+
event: "stream",
|
|
3816
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
3817
|
+
): void;
|
|
3818
|
+
on(
|
|
3819
|
+
event: "goaway",
|
|
3820
|
+
listener: (errorCode: number, lastStreamID: number, opaqueData?: Uint8Array) => void,
|
|
3821
|
+
): void;
|
|
3312
3822
|
on(event: "localSettings" | "remoteSettings", listener: (settings: any) => void): void;
|
|
3313
3823
|
on(event: "frameError", listener: (type: number, code: number, id: number) => void): void;
|
|
3314
3824
|
on(event: "ping", listener: (payload: Uint8Array) => void): void;
|
|
3315
3825
|
once(event: "close" | "timeout", listener: () => void): void;
|
|
3316
3826
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3317
|
-
once(
|
|
3318
|
-
|
|
3319
|
-
|
|
3827
|
+
once(
|
|
3828
|
+
event: "connect",
|
|
3829
|
+
listener: (session: Http2Session, socket: import("net").Socket) => void,
|
|
3830
|
+
): void;
|
|
3831
|
+
once(
|
|
3832
|
+
event: "stream",
|
|
3833
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
3834
|
+
): void;
|
|
3835
|
+
once(
|
|
3836
|
+
event: "goaway",
|
|
3837
|
+
listener: (errorCode: number, lastStreamID: number, opaqueData?: Uint8Array) => void,
|
|
3838
|
+
): void;
|
|
3320
3839
|
once(event: "localSettings" | "remoteSettings", listener: (settings: any) => void): void;
|
|
3321
3840
|
}
|
|
3322
3841
|
|
|
3323
3842
|
export interface ClientHttp2Session extends Http2Session {
|
|
3324
|
-
request(
|
|
3843
|
+
request(
|
|
3844
|
+
headers?: OutgoingHttpHeaders,
|
|
3845
|
+
options?: {
|
|
3846
|
+
endStream?: boolean;
|
|
3847
|
+
exclusive?: boolean;
|
|
3848
|
+
parent?: number;
|
|
3849
|
+
weight?: number;
|
|
3850
|
+
waitForTrailers?: boolean;
|
|
3851
|
+
},
|
|
3852
|
+
): ClientHttp2Stream;
|
|
3325
3853
|
}
|
|
3326
3854
|
|
|
3327
3855
|
export interface ServerHttp2Session extends Http2Session {
|
|
@@ -3357,18 +3885,58 @@ declare module "http2" {
|
|
|
3357
3885
|
|
|
3358
3886
|
export interface ServerHttp2Stream extends Http2StreamCore {
|
|
3359
3887
|
on(event: "data", listener: (chunk: any) => void): void;
|
|
3360
|
-
on(
|
|
3888
|
+
on(
|
|
3889
|
+
event:
|
|
3890
|
+
| "end"
|
|
3891
|
+
| "close"
|
|
3892
|
+
| "aborted"
|
|
3893
|
+
| "ready"
|
|
3894
|
+
| "timeout"
|
|
3895
|
+
| "drain"
|
|
3896
|
+
| "finish"
|
|
3897
|
+
| "wantTrailers",
|
|
3898
|
+
listener: () => void,
|
|
3899
|
+
): void;
|
|
3361
3900
|
on(event: "error", listener: (err: Error) => void): void;
|
|
3362
3901
|
on(event: "frameError", listener: (type: number, code: number, id: number) => void): void;
|
|
3363
3902
|
on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3364
3903
|
once(event: "data", listener: (chunk: any) => void): void;
|
|
3365
|
-
once(
|
|
3904
|
+
once(
|
|
3905
|
+
event:
|
|
3906
|
+
| "end"
|
|
3907
|
+
| "close"
|
|
3908
|
+
| "aborted"
|
|
3909
|
+
| "ready"
|
|
3910
|
+
| "timeout"
|
|
3911
|
+
| "drain"
|
|
3912
|
+
| "finish"
|
|
3913
|
+
| "wantTrailers",
|
|
3914
|
+
listener: () => void,
|
|
3915
|
+
): void;
|
|
3366
3916
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3367
3917
|
once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3368
|
-
respond(
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3918
|
+
respond(
|
|
3919
|
+
headers?: OutgoingHttpHeaders,
|
|
3920
|
+
options?: { endStream?: boolean; waitForTrailers?: boolean },
|
|
3921
|
+
): void;
|
|
3922
|
+
respondWithFile(
|
|
3923
|
+
path: string,
|
|
3924
|
+
headers?: OutgoingHttpHeaders,
|
|
3925
|
+
options?: Record<string, unknown>,
|
|
3926
|
+
): void;
|
|
3927
|
+
respondWithFD(
|
|
3928
|
+
fd: number,
|
|
3929
|
+
headers?: OutgoingHttpHeaders,
|
|
3930
|
+
options?: Record<string, unknown>,
|
|
3931
|
+
): void;
|
|
3932
|
+
pushStream(
|
|
3933
|
+
headers: OutgoingHttpHeaders,
|
|
3934
|
+
callback: (
|
|
3935
|
+
err: Error | null,
|
|
3936
|
+
pushStream: ServerHttp2Stream,
|
|
3937
|
+
headers: OutgoingHttpHeaders,
|
|
3938
|
+
) => void,
|
|
3939
|
+
): void;
|
|
3372
3940
|
readonly headersSent: boolean;
|
|
3373
3941
|
readonly pushAllowed: boolean;
|
|
3374
3942
|
additionalHeaders(headers: OutgoingHttpHeaders): void;
|
|
@@ -3379,14 +3947,36 @@ declare module "http2" {
|
|
|
3379
3947
|
on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3380
3948
|
on(event: "headers", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3381
3949
|
on(event: "data", listener: (chunk: any) => void): void;
|
|
3382
|
-
on(
|
|
3950
|
+
on(
|
|
3951
|
+
event:
|
|
3952
|
+
| "end"
|
|
3953
|
+
| "close"
|
|
3954
|
+
| "aborted"
|
|
3955
|
+
| "ready"
|
|
3956
|
+
| "timeout"
|
|
3957
|
+
| "drain"
|
|
3958
|
+
| "finish"
|
|
3959
|
+
| "wantTrailers",
|
|
3960
|
+
listener: () => void,
|
|
3961
|
+
): void;
|
|
3383
3962
|
on(event: "error", listener: (err: Error) => void): void;
|
|
3384
3963
|
on(event: "frameError", listener: (type: number, code: number, id: number) => void): void;
|
|
3385
3964
|
on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3386
3965
|
once(event: "response", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3387
3966
|
once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): void;
|
|
3388
3967
|
once(event: "data", listener: (chunk: any) => void): void;
|
|
3389
|
-
once(
|
|
3968
|
+
once(
|
|
3969
|
+
event:
|
|
3970
|
+
| "end"
|
|
3971
|
+
| "close"
|
|
3972
|
+
| "aborted"
|
|
3973
|
+
| "ready"
|
|
3974
|
+
| "timeout"
|
|
3975
|
+
| "drain"
|
|
3976
|
+
| "finish"
|
|
3977
|
+
| "wantTrailers",
|
|
3978
|
+
listener: () => void,
|
|
3979
|
+
): void;
|
|
3390
3980
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3391
3981
|
}
|
|
3392
3982
|
|
|
@@ -3398,16 +3988,28 @@ declare module "http2" {
|
|
|
3398
3988
|
setTimeout(msecs?: number, callback?: () => void): void;
|
|
3399
3989
|
ref(): void;
|
|
3400
3990
|
unref(): void;
|
|
3401
|
-
on(
|
|
3991
|
+
on(
|
|
3992
|
+
event: "stream",
|
|
3993
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
3994
|
+
): void;
|
|
3402
3995
|
on(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
3403
|
-
on(
|
|
3996
|
+
on(
|
|
3997
|
+
event: "request",
|
|
3998
|
+
listener: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
3999
|
+
): void;
|
|
3404
4000
|
on(event: "error", listener: (err: Error) => void): void;
|
|
3405
4001
|
on(event: "close" | "listening" | "timeout", listener: () => void): void;
|
|
3406
4002
|
on(event: "connection", listener: (socket: import("net").Socket) => void): void;
|
|
3407
4003
|
on(event: "sessionError", listener: (err: Error, session: ServerHttp2Session) => void): void;
|
|
3408
|
-
once(
|
|
4004
|
+
once(
|
|
4005
|
+
event: "stream",
|
|
4006
|
+
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
4007
|
+
): void;
|
|
3409
4008
|
once(event: "session", listener: (session: ServerHttp2Session) => void): void;
|
|
3410
|
-
once(
|
|
4009
|
+
once(
|
|
4010
|
+
event: "request",
|
|
4011
|
+
listener: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
4012
|
+
): void;
|
|
3411
4013
|
once(event: "error", listener: (err: Error) => void): void;
|
|
3412
4014
|
once(event: "close" | "listening" | "timeout", listener: () => void): void;
|
|
3413
4015
|
}
|
|
@@ -3416,11 +4018,23 @@ declare module "http2" {
|
|
|
3416
4018
|
[option: string]: unknown;
|
|
3417
4019
|
}
|
|
3418
4020
|
|
|
3419
|
-
export function createServer(
|
|
3420
|
-
|
|
4021
|
+
export function createServer(
|
|
4022
|
+
onRequestHandler?: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
4023
|
+
): Http2Server;
|
|
4024
|
+
export function createServer(
|
|
4025
|
+
options: ServerOptions,
|
|
4026
|
+
onRequestHandler?: (req: Http2ServerRequest, res: Http2ServerResponse) => void,
|
|
4027
|
+
): Http2Server;
|
|
3421
4028
|
|
|
3422
|
-
export function connect(
|
|
3423
|
-
|
|
4029
|
+
export function connect(
|
|
4030
|
+
authority: string,
|
|
4031
|
+
listener?: (session: ClientHttp2Session, socket: import("net").Socket) => void,
|
|
4032
|
+
): ClientHttp2Session;
|
|
4033
|
+
export function connect(
|
|
4034
|
+
authority: string,
|
|
4035
|
+
options: Record<string, unknown>,
|
|
4036
|
+
listener?: (session: ClientHttp2Session, socket: import("net").Socket) => void,
|
|
4037
|
+
): ClientHttp2Session;
|
|
3424
4038
|
|
|
3425
4039
|
export function getDefaultSettings(): any;
|
|
3426
4040
|
export function getPackedSettings(settings: Record<string, number | boolean>): Uint8Array;
|
|
@@ -3556,7 +4170,11 @@ declare module "node:cluster" {
|
|
|
3556
4170
|
declare module "tty" {
|
|
3557
4171
|
export interface WriteStream {
|
|
3558
4172
|
write(data: string | Uint8Array, callback?: (error?: Error | null) => void): boolean;
|
|
3559
|
-
write(
|
|
4173
|
+
write(
|
|
4174
|
+
data: string | Uint8Array,
|
|
4175
|
+
encoding: BufferEncoding,
|
|
4176
|
+
callback?: (error?: Error | null) => void,
|
|
4177
|
+
): boolean;
|
|
3560
4178
|
readonly isTTY: boolean;
|
|
3561
4179
|
}
|
|
3562
4180
|
export function isatty(fd: number): boolean;
|
|
@@ -3676,7 +4294,12 @@ declare module "stream" {
|
|
|
3676
4294
|
decodeStrings?: boolean;
|
|
3677
4295
|
defaultEncoding?: string;
|
|
3678
4296
|
objectMode?: boolean;
|
|
3679
|
-
write?(
|
|
4297
|
+
write?(
|
|
4298
|
+
this: Writable,
|
|
4299
|
+
chunk: Buffer,
|
|
4300
|
+
encoding: string,
|
|
4301
|
+
callback: (error?: Error | null) => void,
|
|
4302
|
+
): void;
|
|
3680
4303
|
writev?(this: Writable, chunks: unknown[], callback: (error?: Error | null) => void): void;
|
|
3681
4304
|
final?(this: Writable, callback: (error?: Error | null) => void): void;
|
|
3682
4305
|
destroy?(this: Writable, error: Error | null, callback: (error?: Error | null) => void): void;
|
|
@@ -3697,7 +4320,12 @@ declare module "stream" {
|
|
|
3697
4320
|
writableObjectMode?: boolean;
|
|
3698
4321
|
allowHalfOpen?: boolean;
|
|
3699
4322
|
read?(this: Duplex, size: number): void;
|
|
3700
|
-
write?(
|
|
4323
|
+
write?(
|
|
4324
|
+
this: Duplex,
|
|
4325
|
+
chunk: Buffer,
|
|
4326
|
+
encoding: string,
|
|
4327
|
+
callback: (error?: Error | null) => void,
|
|
4328
|
+
): void;
|
|
3701
4329
|
final?(this: Duplex, callback: (error?: Error | null) => void): void;
|
|
3702
4330
|
destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void;
|
|
3703
4331
|
construct?(this: Duplex, callback: (error?: Error | null) => void): void;
|
|
@@ -3720,12 +4348,22 @@ declare module "stream" {
|
|
|
3720
4348
|
readableObjectMode?: boolean;
|
|
3721
4349
|
writableObjectMode?: boolean;
|
|
3722
4350
|
allowHalfOpen?: boolean;
|
|
3723
|
-
transform?(
|
|
4351
|
+
transform?(
|
|
4352
|
+
this: Transform,
|
|
4353
|
+
chunk: Buffer,
|
|
4354
|
+
encoding: string,
|
|
4355
|
+
callback: (error?: Error | null, data?: Buffer | string) => void,
|
|
4356
|
+
): void;
|
|
3724
4357
|
flush?(this: Transform, callback: (error?: Error | null, data?: Buffer | string) => void): void;
|
|
3725
4358
|
destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void;
|
|
3726
4359
|
construct?(this: Transform, callback: (error?: Error | null) => void): void;
|
|
3727
4360
|
read?(this: Transform, size: number): void;
|
|
3728
|
-
write?(
|
|
4361
|
+
write?(
|
|
4362
|
+
this: Transform,
|
|
4363
|
+
chunk: Buffer,
|
|
4364
|
+
encoding: string,
|
|
4365
|
+
callback: (error?: Error | null) => void,
|
|
4366
|
+
): void;
|
|
3729
4367
|
final?(this: Transform, callback: (error?: Error | null) => void): void;
|
|
3730
4368
|
writev?(this: Transform, chunks: unknown[], callback: (error?: Error | null) => void): void;
|
|
3731
4369
|
autoDestroy?: boolean;
|
|
@@ -3776,15 +4414,24 @@ declare module "stream" {
|
|
|
3776
4414
|
once(event: "error", listener: (err: Error) => void): this;
|
|
3777
4415
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
3778
4416
|
addListener(event: "data", listener: (chunk: any) => void): this;
|
|
3779
|
-
addListener(
|
|
4417
|
+
addListener(
|
|
4418
|
+
event: "end" | "close" | "readable" | "pause" | "resume",
|
|
4419
|
+
listener: () => void,
|
|
4420
|
+
): this;
|
|
3780
4421
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
3781
4422
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
3782
4423
|
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
3783
|
-
prependListener(
|
|
4424
|
+
prependListener(
|
|
4425
|
+
event: "end" | "close" | "readable" | "pause" | "resume",
|
|
4426
|
+
listener: () => void,
|
|
4427
|
+
): this;
|
|
3784
4428
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
3785
4429
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
3786
4430
|
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
3787
|
-
prependOnceListener(
|
|
4431
|
+
prependOnceListener(
|
|
4432
|
+
event: "end" | "close" | "readable" | "pause" | "resume",
|
|
4433
|
+
listener: () => void,
|
|
4434
|
+
): this;
|
|
3788
4435
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
3789
4436
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
3790
4437
|
off(event: "data", listener: (chunk: any) => void): this;
|
|
@@ -3792,7 +4439,10 @@ declare module "stream" {
|
|
|
3792
4439
|
off(event: "error", listener: (err: Error) => void): this;
|
|
3793
4440
|
off(event: string, listener: (...args: any[]) => void): this;
|
|
3794
4441
|
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
3795
|
-
removeListener(
|
|
4442
|
+
removeListener(
|
|
4443
|
+
event: "end" | "close" | "readable" | "pause" | "resume",
|
|
4444
|
+
listener: () => void,
|
|
4445
|
+
): this;
|
|
3796
4446
|
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
3797
4447
|
removeListener(event: string, listener: (...args: any[]) => void): this;
|
|
3798
4448
|
}
|
|
@@ -3801,11 +4451,18 @@ declare module "stream" {
|
|
|
3801
4451
|
constructor(opts?: WritableOptions);
|
|
3802
4452
|
/* The underscore-method surface (see Readable). */
|
|
3803
4453
|
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
|
|
3804
|
-
_writev(
|
|
4454
|
+
_writev(
|
|
4455
|
+
chunks: Array<{ chunk: any; encoding: string }>,
|
|
4456
|
+
callback: (error?: Error | null) => void,
|
|
4457
|
+
): void;
|
|
3805
4458
|
_final(callback: (error?: Error | null) => void): void;
|
|
3806
4459
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
3807
4460
|
write(chunk: Buffer | string, callback?: (error?: Error | null) => void): boolean;
|
|
3808
|
-
write(
|
|
4461
|
+
write(
|
|
4462
|
+
chunk: Buffer | string,
|
|
4463
|
+
encoding: string,
|
|
4464
|
+
callback?: (error?: Error | null) => void,
|
|
4465
|
+
): boolean;
|
|
3809
4466
|
end(callback?: () => void): this;
|
|
3810
4467
|
end(chunk: Buffer | string, callback?: () => void): this;
|
|
3811
4468
|
end(chunk: Buffer | string, encoding: string, callback?: () => void): this;
|
|
@@ -3861,10 +4518,17 @@ declare module "stream" {
|
|
|
3861
4518
|
constructor(opts?: DuplexOptions);
|
|
3862
4519
|
/* The underscore-method surface (see Readable). */
|
|
3863
4520
|
_write(chunk: any, encoding: string, callback: (error?: Error | null) => void): void;
|
|
3864
|
-
_writev(
|
|
4521
|
+
_writev(
|
|
4522
|
+
chunks: Array<{ chunk: any; encoding: string }>,
|
|
4523
|
+
callback: (error?: Error | null) => void,
|
|
4524
|
+
): void;
|
|
3865
4525
|
_final(callback: (error?: Error | null) => void): void;
|
|
3866
4526
|
write(chunk: Buffer | string, callback?: (error?: Error | null) => void): boolean;
|
|
3867
|
-
write(
|
|
4527
|
+
write(
|
|
4528
|
+
chunk: Buffer | string,
|
|
4529
|
+
encoding: string,
|
|
4530
|
+
callback?: (error?: Error | null) => void,
|
|
4531
|
+
): boolean;
|
|
3868
4532
|
end(callback?: () => void): this;
|
|
3869
4533
|
end(chunk: Buffer | string, callback?: () => void): this;
|
|
3870
4534
|
end(chunk: Buffer | string, encoding: string, callback?: () => void): this;
|
|
@@ -3881,37 +4545,58 @@ declare module "stream" {
|
|
|
3881
4545
|
readonly writableCorked: number;
|
|
3882
4546
|
readonly allowHalfOpen: boolean;
|
|
3883
4547
|
on(event: "data", listener: (chunk: any) => void): this;
|
|
3884
|
-
on(
|
|
4548
|
+
on(
|
|
4549
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4550
|
+
listener: () => void,
|
|
4551
|
+
): this;
|
|
3885
4552
|
on(event: "error", listener: (err: Error) => void): this;
|
|
3886
4553
|
on(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3887
4554
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
3888
4555
|
once(event: "data", listener: (chunk: any) => void): this;
|
|
3889
|
-
once(
|
|
4556
|
+
once(
|
|
4557
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4558
|
+
listener: () => void,
|
|
4559
|
+
): this;
|
|
3890
4560
|
once(event: "error", listener: (err: Error) => void): this;
|
|
3891
4561
|
once(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3892
4562
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
3893
4563
|
addListener(event: "data", listener: (chunk: any) => void): this;
|
|
3894
|
-
addListener(
|
|
4564
|
+
addListener(
|
|
4565
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4566
|
+
listener: () => void,
|
|
4567
|
+
): this;
|
|
3895
4568
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
3896
4569
|
addListener(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3897
4570
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
3898
4571
|
prependListener(event: "data", listener: (chunk: any) => void): this;
|
|
3899
|
-
prependListener(
|
|
4572
|
+
prependListener(
|
|
4573
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4574
|
+
listener: () => void,
|
|
4575
|
+
): this;
|
|
3900
4576
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
3901
4577
|
prependListener(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3902
4578
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
3903
4579
|
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
|
|
3904
|
-
prependOnceListener(
|
|
4580
|
+
prependOnceListener(
|
|
4581
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4582
|
+
listener: () => void,
|
|
4583
|
+
): this;
|
|
3905
4584
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
3906
4585
|
prependOnceListener(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3907
4586
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
3908
4587
|
off(event: "data", listener: (chunk: any) => void): this;
|
|
3909
|
-
off(
|
|
4588
|
+
off(
|
|
4589
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4590
|
+
listener: () => void,
|
|
4591
|
+
): this;
|
|
3910
4592
|
off(event: "error", listener: (err: Error) => void): this;
|
|
3911
4593
|
off(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3912
4594
|
off(event: string, listener: (...args: any[]) => void): this;
|
|
3913
4595
|
removeListener(event: "data", listener: (chunk: any) => void): this;
|
|
3914
|
-
removeListener(
|
|
4596
|
+
removeListener(
|
|
4597
|
+
event: "end" | "close" | "readable" | "pause" | "resume" | "drain" | "finish",
|
|
4598
|
+
listener: () => void,
|
|
4599
|
+
): this;
|
|
3915
4600
|
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
3916
4601
|
removeListener(event: "pipe" | "unpipe", listener: (src: Readable) => void): this;
|
|
3917
4602
|
removeListener(event: string, listener: (...args: any[]) => void): this;
|
|
@@ -3920,7 +4605,11 @@ declare module "stream" {
|
|
|
3920
4605
|
class Transform extends Duplex {
|
|
3921
4606
|
constructor(opts?: TransformOptions);
|
|
3922
4607
|
/* The underscore-method surface (see Readable). */
|
|
3923
|
-
_transform(
|
|
4608
|
+
_transform(
|
|
4609
|
+
chunk: any,
|
|
4610
|
+
encoding: string,
|
|
4611
|
+
callback: (error?: Error | null, data?: Buffer | string) => void,
|
|
4612
|
+
): void;
|
|
3924
4613
|
_flush(callback: (error?: Error | null, data?: Buffer | string) => void): void;
|
|
3925
4614
|
}
|
|
3926
4615
|
class PassThrough extends Transform {
|
|
@@ -3939,7 +4628,18 @@ declare module "stream" {
|
|
|
3939
4628
|
}
|
|
3940
4629
|
class Stream extends EventEmitter {}
|
|
3941
4630
|
|
|
3942
|
-
export {
|
|
4631
|
+
export {
|
|
4632
|
+
Readable,
|
|
4633
|
+
Writable,
|
|
4634
|
+
Duplex,
|
|
4635
|
+
Transform,
|
|
4636
|
+
PassThrough,
|
|
4637
|
+
Stream,
|
|
4638
|
+
pipeline,
|
|
4639
|
+
finished,
|
|
4640
|
+
getDefaultHighWaterMark,
|
|
4641
|
+
promises,
|
|
4642
|
+
};
|
|
3943
4643
|
export type { ReadableOptions, WritableOptions, DuplexOptions, TransformOptions };
|
|
3944
4644
|
}
|
|
3945
4645
|
declare module "node:stream" {
|