Switch FUi to stable channel

This commit is contained in:
grandeljay 2022-10-10 10:26:02 +02:00
parent 44318823f3
commit f839fb1077
1170 changed files with 8538 additions and 42067 deletions

2
node_modules/@types/node/README.md generated vendored
View file

@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
### Additional Details
* Last updated: Sun, 02 Oct 2022 19:33:03 GMT
* Last updated: Thu, 06 Oct 2022 18:02:54 GMT
* Dependencies: none
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`

19
node_modules/@types/node/buffer.d.ts generated vendored
View file

@ -45,6 +45,7 @@
*/
declare module 'buffer' {
import { BinaryLike } from 'node:crypto';
import { ReadableStream as WebReadableStream } from 'node:stream/web';
export const INSPECT_MAX_BYTES: number;
export const kMaxLength: number;
export const kStringMaxLength: number;
@ -157,13 +158,15 @@ declare module 'buffer' {
*/
text(): Promise<string>;
/**
* Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
* Returns a new (WHATWG) `ReadableStream` that allows the content of the `Blob` to be read.
* @since v16.7.0
*/
stream(): unknown; // pending web streams types
stream(): WebReadableStream;
}
export import atob = globalThis.atob;
export import btoa = globalThis.btoa;
import { Blob as _Blob } from 'buffer';
global {
// Buffer class
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
@ -2231,6 +2234,18 @@ declare module 'buffer' {
* @param data An ASCII (Latin1) string.
*/
function btoa(data: string): string;
/**
* `Blob` class is a global reference for `require('node:buffer').Blob`
* https://nodejs.org/api/buffer.html#class-blob
* @since v18.0.0
*/
var Blob: typeof globalThis extends {
onmessage: any;
Blob: infer T;
}
? T
: typeof _Blob;
}
}
declare module 'node:buffer' {

126
node_modules/@types/node/dom-events.d.ts generated vendored Normal file
View file

@ -0,0 +1,126 @@
export {}; // Don't export anything!
//// DOM-like Events
// NB: The Event / EventTarget / EventListener implementations below were copied
// from lib.dom.d.ts, then edited to reflect Node's documentation at
// https://nodejs.org/api/events.html#class-eventtarget.
// Please read that link to understand important implementation differences.
// This conditional type will be the existing global Event in a browser, or
// the copy below in a Node environment.
type __Event = typeof globalThis extends { onmessage: any, Event: infer T }
? T
: {
/** This is not used in Node.js and is provided purely for completeness. */
readonly bubbles: boolean;
/** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
cancelBubble: () => void;
/** True if the event was created with the cancelable option */
readonly cancelable: boolean;
/** This is not used in Node.js and is provided purely for completeness. */
readonly composed: boolean;
/** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
composedPath(): [EventTarget?]
/** Alias for event.target. */
readonly currentTarget: EventTarget | null;
/** Is true if cancelable is true and event.preventDefault() has been called. */
readonly defaultPrevented: boolean;
/** This is not used in Node.js and is provided purely for completeness. */
readonly eventPhase: 0 | 2;
/** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
readonly isTrusted: boolean;
/** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
preventDefault(): void;
/** This is not used in Node.js and is provided purely for completeness. */
returnValue: boolean;
/** Alias for event.target. */
readonly srcElement: EventTarget | null;
/** Stops the invocation of event listeners after the current one completes. */
stopImmediatePropagation(): void;
/** This is not used in Node.js and is provided purely for completeness. */
stopPropagation(): void;
/** The `EventTarget` dispatching the event */
readonly target: EventTarget | null;
/** The millisecond timestamp when the Event object was created. */
readonly timeStamp: number;
/** Returns the type of event, e.g. "click", "hashchange", or "submit". */
readonly type: string;
};
// See comment above explaining conditional type
type __EventTarget = typeof globalThis extends { onmessage: any, EventTarget: infer T }
? T
: {
/**
* Adds a new handler for the `type` event. Any given `listener` is added only once per `type` and per `capture` option value.
*
* If the `once` option is true, the `listener` is removed after the next time a `type` event is dispatched.
*
* The `capture` option is not used by Node.js in any functional way other than tracking registered event listeners per the `EventTarget` specification.
* Specifically, the `capture` option is used as part of the key when registering a `listener`.
* Any individual `listener` may be added once with `capture = false`, and once with `capture = true`.
*/
addEventListener(
type: string,
listener: EventListener | EventListenerObject,
options?: AddEventListenerOptions | boolean,
): void;
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
dispatchEvent(event: Event): boolean;
/** Removes the event listener in target's event listener list with the same type, callback, and options. */
removeEventListener(
type: string,
listener: EventListener | EventListenerObject,
options?: EventListenerOptions | boolean,
): void;
};
interface EventInit {
bubbles?: boolean;
cancelable?: boolean;
composed?: boolean;
}
interface EventListenerOptions {
/** Not directly used by Node.js. Added for API completeness. Default: `false`. */
capture?: boolean;
}
interface AddEventListenerOptions extends EventListenerOptions {
/** When `true`, the listener is automatically removed when it is first invoked. Default: `false`. */
once?: boolean;
/** When `true`, serves as a hint that the listener will not call the `Event` object's `preventDefault()` method. Default: false. */
passive?: boolean;
}
interface EventListener {
(evt: Event): void;
}
interface EventListenerObject {
handleEvent(object: Event): void;
}
import {} from 'events'; // Make this an ambient declaration
declare global {
/** An event which takes place in the DOM. */
interface Event extends __Event {}
var Event: typeof globalThis extends { onmessage: any, Event: infer T }
? T
: {
prototype: __Event;
new (type: string, eventInitDict?: EventInit): __Event;
};
/**
* EventTarget is a DOM interface implemented by objects that can
* receive events and may have listeners for them.
*/
interface EventTarget extends __EventTarget {}
var EventTarget: typeof globalThis extends { onmessage: any, EventTarget: infer T }
? T
: {
prototype: __EventTarget;
new (): __EventTarget;
};
}

49
node_modules/@types/node/events.d.ts generated vendored
View file

@ -35,16 +35,53 @@
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
*/
declare module 'events' {
// NOTE: This class is in the docs but is **not actually exported** by Node.
// If https://github.com/nodejs/node/issues/39903 gets resolved and Node
// actually starts exporting the class, uncomment below.
// import { EventListener, EventListenerObject } from '__dom-events';
// /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
// interface NodeEventTarget extends EventTarget {
// /**
// * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
// * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
// */
// addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
// /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
// eventNames(): string[];
// /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
// listenerCount(type: string): number;
// /** Node.js-specific alias for `eventTarget.removeListener()`. */
// off(type: string, listener: EventListener | EventListenerObject): this;
// /** Node.js-specific alias for `eventTarget.addListener()`. */
// on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
// /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
// once(type: string, listener: EventListener | EventListenerObject): this;
// /**
// * Node.js-specific extension to the `EventTarget` class.
// * If `type` is specified, removes all registered listeners for `type`,
// * otherwise removes all registered listeners.
// */
// removeAllListeners(type: string): this;
// /**
// * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
// * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
// */
// removeListener(type: string, listener: EventListener | EventListenerObject): this;
// }
interface EventEmitterOptions {
/**
* Enables automatic capturing of promise rejection.
*/
captureRejections?: boolean | undefined;
}
interface NodeEventTarget {
// Any EventTarget with a Node-style `once` function
interface _NodeEventTarget {
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
}
interface DOMEventTarget {
// Any EventTarget with a DOM-style `addEventListener`
interface _DOMEventTarget {
addEventListener(
eventName: string,
listener: (...args: any[]) => void,
@ -154,8 +191,8 @@ declare module 'events' {
* ```
* @since v11.13.0, v10.16.0
*/
static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
/**
* ```js
* const { on, EventEmitter } = require('events');
@ -259,7 +296,7 @@ declare module 'events' {
* ```
* @since v15.2.0, v14.17.0
*/
static getEventListeners(emitter: DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
/**
* ```js
* const {
@ -277,7 +314,7 @@ declare module 'events' {
* @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
* objects.
*/
static setMaxListeners(n?: number, ...eventTargets: Array<DOMEventTarget | NodeJS.EventEmitter>): void;
static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
/**
* This symbol shall be used to install a listener for only monitoring `'error'`
* events. Listeners installed using this symbol are called before the regular

View file

@ -57,7 +57,7 @@ interface AbortController {
}
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
interface AbortSignal {
interface AbortSignal extends EventTarget {
/**
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/

17
node_modules/@types/node/http.d.ts generated vendored
View file

@ -1541,6 +1541,23 @@ declare module 'http' {
*/
function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
/**
* Performs the low-level validations on the provided name that are done when res.setHeader(name, value) is called.
* Passing illegal value as name will result in a TypeError being thrown, identified by code: 'ERR_INVALID_HTTP_TOKEN'.
* @param name Header name
* @since v14.3.0
*/
function validateHeaderName(name: string): void;
/**
* Performs the low-level validations on the provided value that are done when res.setHeader(name, value) is called.
* Passing illegal value as value will result in a TypeError being thrown.
* - Undefined value error is identified by code: 'ERR_HTTP_INVALID_HEADER_VALUE'.
* - Invalid value character error is identified by code: 'ERR_INVALID_CHAR'.
* @param name Header name
* @param value Header value
* @since v14.3.0
*/
function validateHeaderValue(name: string, value: string): void;
let globalAgent: Agent;
/**
* Read-only property specifying the maximum allowed size of HTTP headers in bytes.

View file

@ -92,6 +92,7 @@
/// <reference path="dns/promises.d.ts" />
/// <reference path="dns/promises.d.ts" />
/// <reference path="domain.d.ts" />
/// <reference path="dom-events.d.ts" />
/// <reference path="events.d.ts" />
/// <reference path="fs.d.ts" />
/// <reference path="fs/promises.d.ts" />

View file

@ -1,6 +1,6 @@
{
"name": "@types/node",
"version": "18.8.0",
"version": "18.8.3",
"description": "TypeScript definitions for Node.js",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
"license": "MIT",
@ -227,6 +227,6 @@
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "54f0b73dedc6d751a0945c330043a807365cb735a3530635a46ca3432f8b140e",
"typesPublisherContentHash": "3b730356514ec2d4e14259cda1b2473648cbb0b4d9854795045c8e7abd8dfd76",
"typeScriptVersion": "4.1"
}

View file

@ -604,6 +604,21 @@ declare module 'perf_hooks' {
* @since v15.9.0, v14.18.0
*/
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
import { performance as _performance } from 'perf_hooks';
global {
/**
* `performance` is a global reference for `require('perf_hooks').performance`
* https://nodejs.org/api/globals.html#performance
* @since v16.0.0
*/
var performance: typeof globalThis extends {
onmessage: any;
performance: infer T;
}
? T
: typeof _performance;
}
}
declare module 'node:perf_hooks' {
export * from 'perf_hooks';

View file

@ -18,6 +18,7 @@
*/
declare module 'stream' {
import { EventEmitter, Abortable } from 'node:events';
import { Blob } from "node:buffer";
import * as streamPromises from 'node:stream/promises';
import * as streamConsumers from 'node:stream/consumers';
import * as streamWeb from 'node:stream/web';

View file

@ -1,22 +1,10 @@
// Duplicates of interface in lib.dom.ts.
// Duplicated here rather than referencing lib.dom.ts because doing so causes lib.dom.ts to be loaded for "test-all"
// Which in turn causes tests to pass that shouldn't pass.
//
// This interface is not, and should not be, exported.
interface Blob {
readonly size: number;
readonly type: string;
arrayBuffer(): Promise<ArrayBuffer>;
slice(start?: number, end?: number, contentType?: string): Blob;
stream(): NodeJS.ReadableStream;
text(): Promise<string>;
}
declare module 'stream/consumers' {
import { Blob as NodeBlob } from "node:buffer";
import { Readable } from 'node:stream';
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Blob>;
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<NodeBlob>;
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
}
declare module 'node:stream/consumers' {

View file

@ -1541,6 +1541,23 @@ declare module 'http' {
*/
function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
/**
* Performs the low-level validations on the provided name that are done when res.setHeader(name, value) is called.
* Passing illegal value as name will result in a TypeError being thrown, identified by code: 'ERR_INVALID_HTTP_TOKEN'.
* @param name Header name
* @since v14.3.0
*/
function validateHeaderName(name: string): void;
/**
* Performs the low-level validations on the provided value that are done when res.setHeader(name, value) is called.
* Passing illegal value as value will result in a TypeError being thrown.
* - Undefined value error is identified by code: 'ERR_HTTP_INVALID_HEADER_VALUE'.
* - Invalid value character error is identified by code: 'ERR_INVALID_CHAR'.
* @param name Header name
* @param value Header value
* @since v14.3.0
*/
function validateHeaderValue(name: string, value: string): void;
let globalAgent: Agent;
/**
* Read-only property specifying the maximum allowed size of HTTP headers in bytes.

View file

@ -3,6 +3,14 @@
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/test.js)
*/
declare module 'node:test' {
/**
* Programmatically start the test runner.
* @since v18.9.0
* @param options Configuration options for running tests.
* @returns A {@link TapStream} that emits events about the test execution.
*/
function run(options?: RunOptions): TapStream;
/**
* The `test()` function is the value imported from the test module. Each invocation of this
* function results in the creation of a test point in the TAP output.
@ -42,7 +50,7 @@ declare module 'node:test' {
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
function test(fn?: TestFn): Promise<void>;
/*
/**
* @since v18.6.0
* @param name The name of the suite, which is displayed when reporting suite results.
* Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
@ -54,7 +62,7 @@ declare module 'node:test' {
function describe(options?: TestOptions, fn?: SuiteFn): void;
function describe(fn?: SuiteFn): void;
/*
/**
* @since v18.6.0
* @param name The name of the test, which is displayed when reporting test results.
* Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
@ -86,6 +94,122 @@ declare module 'node:test' {
*/
type ItFn = (done: (result?: any) => void) => any;
interface RunOptions {
/**
* @default false
*/
concurrency?: number | boolean;
/**
* An array containing the list of files to run. If unspecified, the test runner execution model will be used.
*/
files?: readonly string[];
/**
* Allows aborting an in-progress test.
* @default undefined
*/
signal?: AbortSignal;
/**
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
* value from their parent.
* @default Infinity
*/
timeout?: number;
}
/**
* A successful call of the run() method will return a new TapStream object, streaming a TAP output.
* TapStream will emit events in the order of the tests' definitions.
* @since v18.9.0
*/
interface TapStream extends NodeJS.ReadableStream {
addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
addListener(event: string, listener: (...args: any[]) => void): this;
emit(event: 'test:diagnostic', message: string): boolean;
emit(event: 'test:fail', data: TestFail): boolean;
emit(event: 'test:pass', data: TestPass): boolean;
emit(event: string | symbol, ...args: any[]): boolean;
on(event: 'test:diagnostic', listener: (message: string) => void): this;
on(event: 'test:fail', listener: (data: TestFail) => void): this;
on(event: 'test:pass', listener: (data: TestPass) => void): this;
on(event: string, listener: (...args: any[]) => void): this;
once(event: 'test:diagnostic', listener: (message: string) => void): this;
once(event: 'test:fail', listener: (data: TestFail) => void): this;
once(event: 'test:pass', listener: (data: TestPass) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
}
interface TestFail {
/**
* The test duration.
*/
duration: number;
/**
* The failure casing test to fail.
*/
error: Error;
/**
* The test name.
*/
name: string;
/**
* The ordinal number of the test.
*/
testNumber: number;
/**
* Present if `context.todo` is called.
*/
todo?: string;
/**
* Present if `context.skip` is called.
*/
skip?: string;
}
interface TestPass {
/**
* The test duration.
*/
duration: number;
/**
* The test name.
*/
name: string;
/**
* The ordinal number of the test.
*/
testNumber: number;
/**
* Present if `context.todo` is called.
*/
todo?: string;
/**
* Present if `context.skip` is called.
*/
skip?: string;
}
/**
* An instance of `TestContext` is passed to each test function in order to interact with the
* test runner. However, the `TestContext` constructor is not exposed as part of the API.
@ -159,7 +283,7 @@ declare module 'node:test' {
/**
* Allows aborting an in-progress test.
* @since 8.7.0
* @since v18.8.0
*/
signal?: AbortSignal;
@ -174,7 +298,7 @@ declare module 'node:test' {
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
* value from their parent.
* @default Infinity
* @since 8.7.0
* @since v18.7.0
*/
timeout?: number;
@ -186,5 +310,5 @@ declare module 'node:test' {
todo?: boolean | string;
}
export { test as default, test, describe, it };
export { test as default, run, test, describe, it };
}

12
node_modules/@types/node/url.d.ts generated vendored
View file

@ -8,7 +8,7 @@
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
*/
declare module 'url' {
import { Blob } from 'node:buffer';
import { Blob as NodeBlob } from 'node:buffer';
import { ClientRequestArgs } from 'node:http';
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
// Input to `url.format`
@ -395,7 +395,7 @@ declare module 'url' {
* @since v16.7.0
* @experimental
*/
static createObjectURL(blob: Blob): string;
static createObjectURL(blob: NodeBlob): string;
/**
* Removes the stored `Blob` identified by the given ID. Attempting to revoke a
* ID that isnt registered will silently fail.
@ -875,9 +875,9 @@ declare module 'url' {
*/
var URL: typeof globalThis extends {
onmessage: any;
URL: infer URL;
URL: infer T;
}
? URL
? T
: typeof _URL;
/**
* `URLSearchParams` class is a global reference for `require('url').URLSearchParams`
@ -886,9 +886,9 @@ declare module 'url' {
*/
var URLSearchParams: typeof globalThis extends {
onmessage: any;
URLSearchParams: infer URLSearchParams;
URLSearchParams: infer T;
}
? URLSearchParams
? T
: typeof _URLSearchParams;
}
}

30
node_modules/@types/node/util.d.ts generated vendored
View file

@ -1067,6 +1067,8 @@ declare module 'util' {
written: number;
}
export { types };
//// TextEncoder/Decoder
/**
* An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All
* instances of `TextEncoder` only support UTF-8 encoding.
@ -1106,6 +1108,34 @@ declare module 'util' {
encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
}
import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
global {
/**
* `TextDecoder` class is a global reference for `require('util').TextDecoder`
* https://nodejs.org/api/globals.html#textdecoder
* @since v11.0.0
*/
var TextDecoder: typeof globalThis extends {
onmessage: any;
TextDecoder: infer TextDecoder;
}
? TextDecoder
: typeof _TextDecoder;
/**
* `TextEncoder` class is a global reference for `require('util').TextEncoder`
* https://nodejs.org/api/globals.html#textencoder
* @since v11.0.0
*/
var TextEncoder: typeof globalThis extends {
onmessage: any;
TextEncoder: infer TextEncoder;
}
? TextEncoder
: typeof _TextEncoder;
}
//// parseArgs
/**
* Provides a high-level API for command-line argument parsing. Takes a
* specification for the expected arguments and returns a structured object

View file

@ -640,6 +640,49 @@ declare module 'worker_threads' {
* for the `key` will be deleted.
*/
function setEnvironmentData(key: Serializable, value: Serializable): void;
import {
BroadcastChannel as _BroadcastChannel,
MessageChannel as _MessageChannel,
MessagePort as _MessagePort,
} from 'worker_threads';
global {
/**
* `BroadcastChannel` class is a global reference for `require('worker_threads').BroadcastChannel`
* https://nodejs.org/api/globals.html#broadcastchannel
* @since v18.0.0
*/
var BroadcastChannel: typeof globalThis extends {
onmessage: any;
BroadcastChannel: infer T;
}
? T
: typeof _BroadcastChannel;
/**
* `MessageChannel` class is a global reference for `require('worker_threads').MessageChannel`
* https://nodejs.org/api/globals.html#messagechannel
* @since v15.0.0
*/
var MessageChannel: typeof globalThis extends {
onmessage: any;
MessageChannel: infer T;
}
? T
: typeof _MessageChannel;
/**
* `MessagePort` class is a global reference for `require('worker_threads').MessagePort`
* https://nodejs.org/api/globals.html#messageport
* @since v15.0.0
*/
var MessagePort: typeof globalThis extends {
onmessage: any;
MessagePort: infer T;
}
? T
: typeof _MessagePort;
}
}
declare module 'node:worker_threads' {
export * from 'worker_threads';