|
export {}; |
|
|
|
|
|
|
|
|
|
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request; |
|
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response; |
|
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData; |
|
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers; |
|
type _RequestInit = typeof globalThis extends { onmessage: any } ? {} |
|
: import("undici-types").RequestInit; |
|
type _ResponseInit = typeof globalThis extends { onmessage: any } ? {} |
|
: import("undici-types").ResponseInit; |
|
type _File = typeof globalThis extends { onmessage: any } ? {} : import("node:buffer").File; |
|
|
|
|
|
declare global { |
|
|
|
interface ErrorConstructor { |
|
|
|
captureStackTrace(targetObject: object, constructorOpt?: Function): void; |
|
|
|
|
|
|
|
|
|
|
|
|
|
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; |
|
|
|
stackTraceLimit: number; |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface NodeRequire extends NodeJS.Require {} |
|
interface RequireResolve extends NodeJS.RequireResolve {} |
|
interface NodeModule extends NodeJS.Module {} |
|
|
|
var process: NodeJS.Process; |
|
var console: Console; |
|
|
|
var __filename: string; |
|
var __dirname: string; |
|
|
|
var require: NodeRequire; |
|
var module: NodeModule; |
|
|
|
|
|
var exports: any; |
|
|
|
|
|
|
|
|
|
var gc: undefined | (() => void); |
|
|
|
|
|
|
|
|
|
interface AbortController { |
|
|
|
|
|
|
|
|
|
readonly signal: AbortSignal; |
|
|
|
|
|
|
|
abort(reason?: any): void; |
|
} |
|
|
|
|
|
interface AbortSignal extends EventTarget { |
|
|
|
|
|
|
|
readonly aborted: boolean; |
|
readonly reason: any; |
|
onabort: null | ((this: AbortSignal, event: Event) => any); |
|
throwIfAborted(): void; |
|
} |
|
|
|
var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T |
|
: { |
|
prototype: AbortController; |
|
new(): AbortController; |
|
}; |
|
|
|
var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T |
|
: { |
|
prototype: AbortSignal; |
|
new(): AbortSignal; |
|
abort(reason?: any): AbortSignal; |
|
timeout(milliseconds: number): AbortSignal; |
|
}; |
|
|
|
|
|
|
|
interface SymbolConstructor { |
|
|
|
|
|
|
|
readonly dispose: unique symbol; |
|
|
|
|
|
|
|
|
|
readonly asyncDispose: unique symbol; |
|
} |
|
|
|
interface Disposable { |
|
[Symbol.dispose](): void; |
|
} |
|
|
|
interface AsyncDisposable { |
|
[Symbol.asyncDispose](): PromiseLike<void>; |
|
} |
|
|
|
|
|
|
|
interface RelativeIndexable<T> { |
|
|
|
|
|
|
|
|
|
|
|
at(index: number): T | undefined; |
|
} |
|
interface String extends RelativeIndexable<string> {} |
|
interface Array<T> extends RelativeIndexable<T> {} |
|
interface ReadonlyArray<T> extends RelativeIndexable<T> {} |
|
interface Int8Array extends RelativeIndexable<number> {} |
|
interface Uint8Array extends RelativeIndexable<number> {} |
|
interface Uint8ClampedArray extends RelativeIndexable<number> {} |
|
interface Int16Array extends RelativeIndexable<number> {} |
|
interface Uint16Array extends RelativeIndexable<number> {} |
|
interface Int32Array extends RelativeIndexable<number> {} |
|
interface Uint32Array extends RelativeIndexable<number> {} |
|
interface Float32Array extends RelativeIndexable<number> {} |
|
interface Float64Array extends RelativeIndexable<number> {} |
|
interface BigInt64Array extends RelativeIndexable<bigint> {} |
|
interface BigUint64Array extends RelativeIndexable<bigint> {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function structuredClone<T>( |
|
value: T, |
|
transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> }, |
|
): T; |
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace NodeJS { |
|
interface CallSite { |
|
|
|
|
|
|
|
getThis(): unknown; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTypeName(): string | null; |
|
|
|
|
|
|
|
|
|
getFunction(): Function | undefined; |
|
|
|
|
|
|
|
|
|
|
|
|
|
getFunctionName(): string | null; |
|
|
|
|
|
|
|
|
|
|
|
getMethodName(): string | null; |
|
|
|
|
|
|
|
|
|
getFileName(): string | undefined; |
|
|
|
|
|
|
|
|
|
getLineNumber(): number | null; |
|
|
|
|
|
|
|
|
|
getColumnNumber(): number | null; |
|
|
|
|
|
|
|
|
|
|
|
getEvalOrigin(): string | undefined; |
|
|
|
|
|
|
|
|
|
isToplevel(): boolean; |
|
|
|
|
|
|
|
|
|
isEval(): boolean; |
|
|
|
|
|
|
|
|
|
isNative(): boolean; |
|
|
|
|
|
|
|
|
|
isConstructor(): boolean; |
|
|
|
|
|
|
|
|
|
isAsync(): boolean; |
|
|
|
|
|
|
|
|
|
isPromiseAll(): boolean; |
|
|
|
|
|
|
|
|
|
|
|
|
|
getPromiseIndex(): number | null; |
|
|
|
getScriptNameOrSourceURL(): string; |
|
getScriptHash(): string; |
|
|
|
getEnclosingColumnNumber(): number; |
|
getEnclosingLineNumber(): number; |
|
getPosition(): number; |
|
|
|
toString(): string; |
|
} |
|
|
|
interface ErrnoException extends Error { |
|
errno?: number | undefined; |
|
code?: string | undefined; |
|
path?: string | undefined; |
|
syscall?: string | undefined; |
|
} |
|
|
|
interface ReadableStream extends EventEmitter { |
|
readable: boolean; |
|
read(size?: number): string | Buffer; |
|
setEncoding(encoding: BufferEncoding): this; |
|
pause(): this; |
|
resume(): this; |
|
isPaused(): boolean; |
|
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T; |
|
unpipe(destination?: WritableStream): this; |
|
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void; |
|
wrap(oldStream: ReadableStream): this; |
|
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>; |
|
} |
|
|
|
interface WritableStream extends EventEmitter { |
|
writable: boolean; |
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean; |
|
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean; |
|
end(cb?: () => void): this; |
|
end(data: string | Uint8Array, cb?: () => void): this; |
|
end(str: string, encoding?: BufferEncoding, cb?: () => void): this; |
|
} |
|
|
|
interface ReadWriteStream extends ReadableStream, WritableStream {} |
|
|
|
interface RefCounted { |
|
ref(): this; |
|
unref(): this; |
|
} |
|
|
|
type TypedArray = |
|
| Uint8Array |
|
| Uint8ClampedArray |
|
| Uint16Array |
|
| Uint32Array |
|
| Int8Array |
|
| Int16Array |
|
| Int32Array |
|
| BigUint64Array |
|
| BigInt64Array |
|
| Float32Array |
|
| Float64Array; |
|
type ArrayBufferView = TypedArray | DataView; |
|
|
|
interface Require { |
|
(id: string): any; |
|
resolve: RequireResolve; |
|
cache: Dict<NodeModule>; |
|
|
|
|
|
|
|
extensions: RequireExtensions; |
|
main: Module | undefined; |
|
} |
|
|
|
interface RequireResolve { |
|
(id: string, options?: { paths?: string[] | undefined }): string; |
|
paths(request: string): string[] | null; |
|
} |
|
|
|
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> { |
|
".js": (m: Module, filename: string) => any; |
|
".json": (m: Module, filename: string) => any; |
|
".node": (m: Module, filename: string) => any; |
|
} |
|
interface Module { |
|
|
|
|
|
|
|
isPreloading: boolean; |
|
exports: any; |
|
require: Require; |
|
id: string; |
|
filename: string; |
|
loaded: boolean; |
|
|
|
parent: Module | null | undefined; |
|
children: Module[]; |
|
|
|
|
|
|
|
|
|
|
|
path: string; |
|
paths: string[]; |
|
} |
|
|
|
interface Dict<T> { |
|
[key: string]: T | undefined; |
|
} |
|
|
|
interface ReadOnlyDict<T> { |
|
readonly [key: string]: T | undefined; |
|
} |
|
} |
|
|
|
interface RequestInit extends _RequestInit {} |
|
|
|
function fetch( |
|
input: string | URL | globalThis.Request, |
|
init?: RequestInit, |
|
): Promise<Response>; |
|
|
|
interface Request extends _Request {} |
|
var Request: typeof globalThis extends { |
|
onmessage: any; |
|
Request: infer T; |
|
} ? T |
|
: typeof import("undici-types").Request; |
|
|
|
interface ResponseInit extends _ResponseInit {} |
|
|
|
interface Response extends _Response {} |
|
var Response: typeof globalThis extends { |
|
onmessage: any; |
|
Response: infer T; |
|
} ? T |
|
: typeof import("undici-types").Response; |
|
|
|
interface FormData extends _FormData {} |
|
var FormData: typeof globalThis extends { |
|
onmessage: any; |
|
FormData: infer T; |
|
} ? T |
|
: typeof import("undici-types").FormData; |
|
|
|
interface Headers extends _Headers {} |
|
var Headers: typeof globalThis extends { |
|
onmessage: any; |
|
Headers: infer T; |
|
} ? T |
|
: typeof import("undici-types").Headers; |
|
|
|
interface File extends _File {} |
|
var File: typeof globalThis extends { |
|
onmessage: any; |
|
File: infer T; |
|
} ? T |
|
: typeof import("node:buffer").File; |
|
} |
|
|