Merge branch 'main' into dependabot/npm_and_yarn/types/semver-7.3.8

This commit is contained in:
Edoardo Pirovano 2021-07-28 10:08:53 +01:00 committed by GitHub
commit cdcc3e81d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
182 changed files with 33894 additions and 246 deletions

42
node_modules/@types/jszip/LICENSE generated vendored
View file

@ -1,21 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

19
node_modules/@types/jszip/README.md generated vendored
View file

@ -1,16 +1,3 @@
# Installation
> `npm install --save @types/jszip`
# Summary
This package contains type definitions for JSZip ( http://stuk.github.com/jszip/ ).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jszip
Additional Details
* Last updated: Mon, 20 May 2019 21:14:34 GMT
* Dependencies: @types/node
* Global values: none
# Credits
These definitions were written by mzeiher <https://github.com/mzeiher>, forabi <https://github.com/forabi>.
This is a stub types definition for jszip (https://github.com/Stuk/jszip).
jszip provides its own type definitions, so you don't need @types/jszip installed!

260
node_modules/@types/jszip/index.d.ts generated vendored
View file

@ -1,260 +0,0 @@
// Type definitions for JSZip 3.1
// Project: http://stuk.github.com/jszip/, https://github.com/stuk/jszip
// Definitions by: mzeiher <https://github.com/mzeiher>, forabi <https://github.com/forabi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
/// <reference types="node" />
interface JSZipSupport {
arraybuffer: boolean;
uint8array: boolean;
blob: boolean;
nodebuffer: boolean;
}
type Compression = 'STORE' | 'DEFLATE';
interface Metadata {
percent: number;
currentFile: string;
}
type OnUpdateCallback = (metadata: Metadata) => void;
interface InputByType {
base64: string;
string: string;
text: string;
binarystring: string;
array: number[];
uint8array: Uint8Array;
arraybuffer: ArrayBuffer;
blob: Blob;
stream: NodeJS.ReadableStream;
}
interface OutputByType {
base64: string;
text: string;
binarystring: string;
array: number[];
uint8array: Uint8Array;
arraybuffer: ArrayBuffer;
blob: Blob;
nodebuffer: Buffer;
}
type InputFileFormat = InputByType[keyof InputByType];
declare namespace JSZip {
type InputType = keyof InputByType;
type OutputType = keyof OutputByType;
interface JSZipObject {
name: string;
dir: boolean;
date: Date;
comment: string;
/** The UNIX permissions of the file, if any. */
unixPermissions: number | string | null;
/** The UNIX permissions of the file, if any. */
dosPermissions: number | null;
options: JSZipObjectOptions;
/**
* Prepare the content in the asked type.
* @param type the type of the result.
* @param onUpdate a function to call on each internal update.
* @return Promise the promise of the result.
*/
async<T extends OutputType>(type: T, onUpdate?: OnUpdateCallback): Promise<OutputByType[T]>;
nodeStream(type?: 'nodestream', onUpdate?: OnUpdateCallback): NodeJS.ReadableStream;
}
interface JSZipFileOptions {
/** Set to `true` if the data is `base64` encoded. For example image data from a `<canvas>` element. Plain text and HTML do not need this option. */
base64?: boolean;
/**
* Set to `true` if the data should be treated as raw content, `false` if this is a text. If `base64` is used,
* this defaults to `true`, if the data is not a `string`, this will be set to `true`.
*/
binary?: boolean;
/**
* The last modification date, defaults to the current date.
*/
date?: Date;
compression?: string;
comment?: string;
/** Set to `true` if (and only if) the input is a "binary string" and has already been prepared with a `0xFF` mask. */
optimizedBinaryString?: boolean;
/** Set to `true` if folders in the file path should be automatically created, otherwise there will only be virtual folders that represent the path to the file. */
createFolders?: boolean;
/** Set to `true` if this is a directory and content should be ignored. */
dir?: boolean;
/** 6 bits number. The DOS permissions of the file, if any. */
dosPermissions?: number | null;
/**
* 16 bits number. The UNIX permissions of the file, if any.
* Also accepts a `string` representing the octal value: `"644"`, `"755"`, etc.
*/
unixPermissions?: number | string | null;
}
interface JSZipObjectOptions {
compression: Compression;
}
interface JSZipGeneratorOptions<T extends OutputType = OutputType> {
compression?: Compression;
compressionOptions?: null | {
level: number;
};
type?: T;
comment?: string;
/**
* mime-type for the generated file.
* Useful when you need to generate a file with a different extension, ie: .ods.
* @default 'application/zip'
*/
mimeType?: string;
encodeFileName?(filename: string): string;
/** Stream the files and create file descriptors */
streamFiles?: boolean;
/** DOS (default) or UNIX */
platform?: 'DOS' | 'UNIX';
}
interface JSZipLoadOptions {
base64?: boolean;
checkCRC32?: boolean;
optimizedBinaryString?: boolean;
createFolders?: boolean;
decodeFileName?(filenameBytes: Uint8Array): string;
}
}
interface JSZip {
files: {[key: string]: JSZip.JSZipObject};
/**
* Get a file from the archive
*
* @param Path relative path to file
* @return File matching path, null if no file found
*/
file(path: string): JSZip.JSZipObject;
/**
* Get files matching a RegExp from archive
*
* @param path RegExp to match
* @return Return all matching files or an empty array
*/
file(path: RegExp): JSZip.JSZipObject[];
/**
* Add a file to the archive
*
* @param path Relative path to file
* @param data Content of the file
* @param options Optional information about the file
* @return JSZip object
*/
file<T extends JSZip.InputType>(path: string, data: InputByType[T] | Promise<InputByType[T]>, options?: JSZip.JSZipFileOptions): this;
file<T extends JSZip.InputType>(path: string, data: null, options?: JSZip.JSZipFileOptions & { dir: true }): this;
/**
* Returns an new JSZip instance with the given folder as root
*
* @param name Name of the folder
* @return New JSZip object with the given folder as root or null
*/
folder(name: string): JSZip;
/**
* Returns new JSZip instances with the matching folders as root
*
* @param name RegExp to match
* @return New array of JSZipFile objects which match the RegExp
*/
folder(name: RegExp): JSZip.JSZipObject[];
/**
* Call a callback function for each entry at this folder level.
*
* @param callback function
*/
forEach(callback: (relativePath: string, file: JSZip.JSZipObject) => void): void;
/**
* Get all files which match the given filter function
*
* @param predicate Filter function
* @return Array of matched elements
*/
filter(predicate: (relativePath: string, file: JSZip.JSZipObject) => boolean): JSZip.JSZipObject[];
/**
* Removes the file or folder from the archive
*
* @param path Relative path of file or folder
* @return Returns the JSZip instance
*/
remove(path: string): JSZip;
/**
* Generates a new archive asynchronously
*
* @param options Optional options for the generator
* @param onUpdate The optional function called on each internal update with the metadata.
* @return The serialized archive
*/
generateAsync<T extends JSZip.OutputType>(options?: JSZip.JSZipGeneratorOptions<T>, onUpdate?: OnUpdateCallback): Promise<OutputByType[T]>;
/**
* Generates a new archive asynchronously
*
* @param options Optional options for the generator
* @param onUpdate The optional function called on each internal update with the metadata.
* @return A Node.js `ReadableStream`
*/
generateNodeStream(options?: JSZip.JSZipGeneratorOptions<'nodebuffer'>, onUpdate?: OnUpdateCallback): NodeJS.ReadableStream;
/**
* Deserialize zip file asynchronously
*
* @param data Serialized zip file
* @param options Options for deserializing
* @return Returns promise
*/
loadAsync(data: InputFileFormat, options?: JSZip.JSZipLoadOptions): Promise<JSZip>;
/**
* Create JSZip instance
*/
/**
* Create JSZip instance
* If no parameters given an empty zip archive will be created
*
* @param data Serialized zip archive
* @param options Description of the serialized zip archive
*/
new (data?: InputFileFormat, options?: JSZip.JSZipLoadOptions): this;
(): JSZip;
prototype: JSZip;
support: JSZipSupport;
external: {
Promise: PromiseConstructorLike;
};
version: string;
}
declare var JSZip: JSZip;
export = JSZip;

View file

@ -1,31 +1,14 @@
{
"name": "@types/jszip",
"version": "3.1.6",
"description": "TypeScript definitions for JSZip",
"license": "MIT",
"contributors": [
{
"name": "mzeiher",
"url": "https://github.com/mzeiher",
"githubUsername": "mzeiher"
},
{
"name": "forabi",
"url": "https://github.com/forabi",
"githubUsername": "forabi"
}
],
"version": "3.4.1",
"typings": null,
"description": "Stub TypeScript definitions entry for jszip, which provides its own types definitions",
"main": "",
"types": "index",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/jszip"
},
"scripts": {},
"author": "",
"repository": "https://github.com/Stuk/jszip",
"license": "MIT",
"dependencies": {
"@types/node": "*"
},
"typesPublisherContentHash": "b39880f7d79a626d32182cc6886711e3db5e4728ace6005cbfd57457fee69d85",
"typeScriptVersion": "2.3"
"jszip": "*"
}
}

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

@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
### Additional Details
* Last updated: Mon, 26 Jul 2021 00:01:15 GMT
* Last updated: Wed, 28 Jul 2021 07:31:16 GMT
* Dependencies: none
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`

View file

@ -197,7 +197,7 @@ declare module 'async_hooks' {
* @param callbacks The `Hook Callbacks` to register
* @return Instance used for disabling and enabling hooks
*/
function createHook(options: HookCallbacks): AsyncHook;
function createHook(callbacks: HookCallbacks): AsyncHook;
interface AsyncResourceOptions {
/**
* The ID of the execution context that created this async event.
@ -298,7 +298,7 @@ declare module 'async_hooks' {
* @since v9.6.0
* @param fn The function to call in the execution context of this async resource.
* @param thisArg The receiver to be used for the function call.
* @param ...args Optional arguments to pass to the function.
* @param args Optional arguments to pass to the function.
*/
runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
/**

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

@ -471,7 +471,7 @@ declare module 'buffer' {
* @param sourceStart The offset within `buf` at which to begin comparison.
* @param sourceEnd The offset within `buf` at which to end comparison (not inclusive).
*/
compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
/**
* Copies data from a region of `buf` to a region in `target`, even if the `target`memory region overlaps with `buf`.
*
@ -521,7 +521,7 @@ declare module 'buffer' {
* @param sourceEnd The offset within `buf` at which to stop copying (not inclusive).
* @return The number of bytes copied.
*/
copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
/**
* Returns a new `Buffer` that references the same memory as the original, but
* offset and cropped by the `start` and `end` indices.
@ -546,7 +546,7 @@ declare module 'buffer' {
* @param start Where the new `Buffer` will start.
* @param end Where the new `Buffer` will end (not inclusive).
*/
slice(begin?: number, end?: number): Buffer;
slice(start?: number, end?: number): Buffer;
/**
* Returns a new `Buffer` that references the same memory as the original, but
* offset and cropped by the `start` and `end` indices.
@ -602,7 +602,7 @@ declare module 'buffer' {
* @param start Where the new `Buffer` will start.
* @param end Where the new `Buffer` will end (not inclusive).
*/
subarray(begin?: number, end?: number): Buffer;
subarray(start?: number, end?: number): Buffer;
/**
* Writes `value` to `buf` at the specified `offset` as big-endian.
*
@ -1761,7 +1761,7 @@ declare module 'buffer' {
* @deprecated Use `Buffer.from(data, 'base64')` instead.
* @param data The Base64-encoded input string.
*/
function atob(input: string): string;
function atob(data: string): string;
/**
* Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
* into a string using Base64.
@ -1777,7 +1777,7 @@ declare module 'buffer' {
* @deprecated Use `buf.toString('base64')` instead.
* @param data An ASCII (Latin1) string.
*/
function btoa(input: string): string;
function btoa(data: string): string;
}
}
declare module 'node:buffer' {

View file

@ -1342,13 +1342,13 @@ declare module 'child_process' {
* @param args List of string arguments.
* @return The stdout from the command.
*/
function execFileSync(command: string): Buffer;
function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
function execFileSync(file: string): Buffer;
function execFileSync(file: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(file: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(file: string, options?: ExecFileSyncOptions): Buffer;
function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
}
declare module 'node:child_process' {
export * from 'child_process';

View file

@ -116,7 +116,9 @@ declare module 'cluster' {
* @since v0.7.0
* @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
*/
send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
send(message: child.Serializable, callback?: (error: Error | null) => void): boolean;
send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
/**
* This function will kill the worker. In the primary, it does this
* by disconnecting the `worker.process`, and once disconnected, killing

View file

@ -83,7 +83,7 @@ declare module 'node:console' {
* ```
* @since v0.1.101
* @param value The value tested for being truthy.
* @param ...message All arguments besides `value` are used as error message.
* @param message All arguments besides `value` are used as error message.
*/
assert(value: any, message?: string, ...optionalParams: any[]): void;
/**

79
node_modules/@types/node/crypto.d.ts generated vendored
View file

@ -491,7 +491,7 @@ declare module 'crypto' {
* @since v13.1.0
* @param options `stream.transform` options
*/
copy(): Hash;
copy(options?: stream.TransformOptions): Hash;
/**
* Updates the hash content with the given `data`, the encoding of which
* is given in `inputEncoding`.
@ -503,7 +503,7 @@ declare module 'crypto' {
* @param inputEncoding The `encoding` of the `data` string.
*/
update(data: BinaryLike): Hash;
update(data: string, input_encoding: Encoding): Hash;
update(data: string, inputEncoding: Encoding): Hash;
/**
* Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
* If `encoding` is provided a string will be returned; otherwise
@ -648,7 +648,7 @@ declare module 'crypto' {
* @param inputEncoding The `encoding` of the `data` string.
*/
update(data: BinaryLike): Hmac;
update(data: string, input_encoding: Encoding): Hmac;
update(data: string, inputEncoding: Encoding): Hmac;
/**
* Calculates the HMAC digest of all of the data passed using `hmac.update()`.
* If `encoding` is
@ -1114,9 +1114,9 @@ declare module 'crypto' {
* @param outputEncoding The `encoding` of the return value.
*/
update(data: BinaryLike): Buffer;
update(data: string, input_encoding: Encoding): Buffer;
update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string;
update(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string;
update(data: string, inputEncoding: Encoding): Buffer;
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
/**
* Once the `cipher.final()` method has been called, the `Cipher` object can no
* longer be used to encrypt data. Attempts to call `cipher.final()` more than
@ -1126,7 +1126,7 @@ declare module 'crypto' {
* @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
*/
final(): Buffer;
final(output_encoding: BufferEncoding): string;
final(outputEncoding: BufferEncoding): string;
/**
* When using block encryption algorithms, the `Cipher` class will automatically
* add padding to the input data to the appropriate block size. To disable the
@ -1141,7 +1141,7 @@ declare module 'crypto' {
* @since v0.7.1
* @return for method chaining.
*/
setAutoPadding(auto_padding?: boolean): this;
setAutoPadding(autoPadding?: boolean): this;
}
interface CipherCCM extends Cipher {
setAAD(
@ -1427,9 +1427,9 @@ declare module 'crypto' {
* @param outputEncoding The `encoding` of the return value.
*/
update(data: NodeJS.ArrayBufferView): Buffer;
update(data: string, input_encoding: Encoding): Buffer;
update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string;
update(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string;
update(data: string, inputEncoding: Encoding): Buffer;
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
/**
* Once the `decipher.final()` method has been called, the `Decipher` object can
* no longer be used to decrypt data. Attempts to call `decipher.final()` more
@ -1439,7 +1439,7 @@ declare module 'crypto' {
* @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
*/
final(): Buffer;
final(output_encoding: BufferEncoding): string;
final(outputEncoding: BufferEncoding): string;
/**
* When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
* removing padding.
@ -1551,6 +1551,7 @@ declare module 'crypto' {
* @param encoding The string encoding when `key` is a string.
*/
function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
function createSecretKey(key: string, encoding: BufferEncoding): KeyObject;
/**
* Creates and returns a `Sign` object that uses the given `algorithm`. Use {@link getHashes} to obtain the names of the available digest algorithms.
* Optional `options` argument controls the `stream.Writable` behavior.
@ -1706,7 +1707,7 @@ declare module 'crypto' {
* @param inputEncoding The `encoding` of the `data` string.
*/
update(data: BinaryLike): this;
update(data: string, input_encoding: Encoding): this;
update(data: string, inputEncoding: Encoding): this;
/**
* Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
*
@ -1719,8 +1720,8 @@ declare module 'crypto' {
* called. Multiple calls to `sign.sign()` will result in an error being thrown.
* @since v0.1.92
*/
sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, output_format: BinaryToTextEncoding): string;
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, outputFormat: BinaryToTextEncoding): string;
}
/**
* Creates and returns a `Verify` object that uses the given algorithm.
@ -1765,7 +1766,7 @@ declare module 'crypto' {
* @param inputEncoding The `encoding` of the `data` string.
*/
update(data: BinaryLike): Verify;
update(data: string, input_encoding: Encoding): Verify;
update(data: string, inputEncoding: Encoding): Verify;
/**
* Verifies the provided data using the given `object` and `signature`.
*
@ -1803,11 +1804,11 @@ declare module 'crypto' {
* @param primeEncoding The `encoding` of the `prime` string.
* @param generatorEncoding The `encoding` of the `generator` string.
*/
function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding): DiffieHellman;
function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding, generator: string, generator_encoding: BinaryToTextEncoding): DiffieHellman;
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding): DiffieHellman;
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
function createDiffieHellman(prime: string, primeEncoding: BinaryToTextEncoding, generator: string, generatorEncoding: BinaryToTextEncoding): DiffieHellman;
/**
* The `DiffieHellman` class is a utility for creating Diffie-Hellman key
* exchanges.
@ -1886,10 +1887,10 @@ declare module 'crypto' {
* @param inputEncoding The `encoding` of an `otherPublicKey` string.
* @param outputEncoding The `encoding` of the return value.
*/
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding, output_encoding: BinaryToTextEncoding): string;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
/**
* Returns the Diffie-Hellman prime in the specified `encoding`.
* If `encoding` is provided a string is
@ -1933,8 +1934,8 @@ declare module 'crypto' {
* @since v0.5.0
* @param encoding The `encoding` of the `publicKey` string.
*/
setPublicKey(public_key: NodeJS.ArrayBufferView): void;
setPublicKey(public_key: string, encoding: BufferEncoding): void;
setPublicKey(publicKey: NodeJS.ArrayBufferView): void;
setPublicKey(publicKey: string, encoding: BufferEncoding): void;
/**
* Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
* to be a string. If no `encoding` is provided, `privateKey` is expected
@ -1942,8 +1943,8 @@ declare module 'crypto' {
* @since v0.5.0
* @param encoding The `encoding` of the `privateKey` string.
*/
setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
setPrivateKey(private_key: string, encoding: BufferEncoding): void;
setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
setPrivateKey(privateKey: string, encoding: BufferEncoding): void;
/**
* A bit field containing any warnings and/or errors resulting from a check
* performed during initialization of the `DiffieHellman` object.
@ -2006,7 +2007,7 @@ declare module 'crypto' {
* ```
* @since v0.7.5
*/
function getDiffieHellman(group_name: string): DiffieHellman;
function getDiffieHellman(groupName: string): DiffieHellman;
/**
* Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
* implementation. A selected HMAC digest algorithm specified by `digest` is
@ -2652,7 +2653,7 @@ declare module 'crypto' {
* object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
* @since v0.11.14
*/
function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
/**
* Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
* the corresponding public key, for example using {@link publicDecrypt}.
@ -2661,7 +2662,7 @@ declare module 'crypto' {
* object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
* @since v1.1.0
*/
function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
/**
* ```js
* const {
@ -2881,10 +2882,10 @@ declare module 'crypto' {
* @param inputEncoding The `encoding` of the `otherPublicKey` string.
* @param outputEncoding The `encoding` of the return value.
*/
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding, output_encoding: BinaryToTextEncoding): string;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding: BinaryToTextEncoding): string;
/**
* If `encoding` is specified, a string is returned; otherwise a `Buffer` is
* returned.
@ -2916,8 +2917,8 @@ declare module 'crypto' {
* @since v0.11.14
* @param encoding The `encoding` of the `privateKey` string.
*/
setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
setPrivateKey(private_key: string, encoding: BinaryToTextEncoding): void;
setPrivateKey(privateKey: NodeJS.ArrayBufferView): void;
setPrivateKey(privateKey: string, encoding: BinaryToTextEncoding): void;
}
/**
* Creates an Elliptic Curve Diffie-Hellman (`ECDH`) key exchange object using a
@ -2926,7 +2927,7 @@ declare module 'crypto' {
* and description of each available elliptic curve.
* @since v0.11.14
*/
function createECDH(curve_name: string): ECDH;
function createECDH(curveName: string): ECDH;
/**
* This function is based on a constant-time algorithm.
* Returns true if `a` is equal to `b`, without leaking timing information that
@ -3960,7 +3961,7 @@ declare module 'crypto' {
* @param candidate A possible prime encoded as a sequence of big endian octets of arbitrary length.
* @return `true` if the candidate is a prime with an error probability less than `0.25 ** options.checks`.
*/
function checkPrimeSync(value: LargeNumberLike, options?: CheckPrimeOptions): boolean;
function checkPrimeSync(candidate: LargeNumberLike, options?: CheckPrimeOptions): boolean;
namespace webcrypto {
class CryptoKey {} // placeholder
}

View file

@ -84,7 +84,7 @@ declare module 'diagnostics_channel' {
* ```
* @param onMessage The handler to receive channel messages
*/
subscribe(listener: ChannelListener): void;
subscribe(onMessage: ChannelListener): void;
/**
* Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
*
@ -103,7 +103,7 @@ declare module 'diagnostics_channel' {
* ```
* @param onMessage The previous subscribed handler to remove
*/
unsubscribe(listener: ChannelListener): void;
unsubscribe(onMessage: ChannelListener): void;
}
}
declare module 'node:diagnostics_channel' {

View file

@ -127,7 +127,7 @@ declare module 'domain' {
* @param callback The callback function
* @return The bound function
*/
bind<T extends Function>(cb: T): T;
bind<T extends Function>(callback: T): T;
/**
* This method is almost identical to {@link bind}. However, in
* addition to catching thrown errors, it will also intercept `Error` objects sent as the first argument to the function.
@ -160,7 +160,7 @@ declare module 'domain' {
* @param callback The callback function
* @return The intercepted function
*/
intercept<T extends Function>(cb: T): T;
intercept<T extends Function>(callback: T): T;
}
function create(): Domain;
}

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

@ -42,11 +42,11 @@ declare module 'events' {
captureRejections?: boolean | undefined;
}
interface NodeEventTarget {
once(event: string | symbol, listener: (...args: any[]) => void): this;
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
}
interface DOMEventTarget {
addEventListener(
event: string,
eventName: string,
listener: (...args: any[]) => void,
opts?: {
once: boolean;
@ -72,11 +72,11 @@ declare module 'events' {
*/
class EventEmitter {
constructor(options?: EventEmitterOptions);
static once(emitter: NodeEventTarget, event: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: DOMEventTarget, event: string, options?: StaticEventEmitterOptions): Promise<any[]>;
static on(emitter: NodeJS.EventEmitter, event: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
static once(emitter: NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
/** @deprecated since v4.0.0 */
static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
/**
* Returns a list listener for a specific emitter event name.
*/
@ -117,7 +117,7 @@ declare module 'events' {
* Alias for `emitter.on(eventName, listener)`.
* @since v0.1.26
*/
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds the `listener` function to the end of the listeners array for the
* event named `eventName`. No checks are made to see if the `listener` has
@ -148,7 +148,7 @@ declare module 'events' {
* @param eventName The name of the event.
* @param listener The callback function
*/
on(event: string | symbol, listener: (...args: any[]) => void): this;
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds a **one-time**`listener` function for the event named `eventName`. The
* next time `eventName` is triggered, this listener is removed and then invoked.
@ -177,7 +177,7 @@ declare module 'events' {
* @param eventName The name of the event.
* @param listener The callback function
*/
once(event: string | symbol, listener: (...args: any[]) => void): this;
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Removes the specified `listener` from the listener array for the event named`eventName`.
*
@ -257,12 +257,12 @@ declare module 'events' {
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.1.26
*/
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Alias for `emitter.removeListener()`.
* @since v10.0.0
*/
off(event: string | symbol, listener: (...args: any[]) => void): this;
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Removes all listeners, or those of the specified `eventName`.
*
@ -302,7 +302,7 @@ declare module 'events' {
* ```
* @since v0.1.26
*/
listeners(event: string | symbol): Function[];
listeners(eventName: string | symbol): Function[];
/**
* Returns a copy of the array of listeners for the event named `eventName`,
* including any wrappers (such as those created by `.once()`).
@ -332,7 +332,7 @@ declare module 'events' {
* ```
* @since v9.4.0
*/
rawListeners(event: string | symbol): Function[];
rawListeners(eventName: string | symbol): Function[];
/**
* Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
* to each.
@ -373,13 +373,13 @@ declare module 'events' {
* ```
* @since v0.1.26
*/
emit(event: string | symbol, ...args: any[]): boolean;
emit(eventName: string | symbol, ...args: any[]): boolean;
/**
* Returns the number of listeners listening to the event named `eventName`.
* @since v3.2.0
* @param eventName The name of the event being listened for
*/
listenerCount(event: string | symbol): number;
listenerCount(eventName: string | symbol): number;
/**
* Adds the `listener` function to the _beginning_ of the listeners array for the
* event named `eventName`. No checks are made to see if the `listener` has
@ -397,7 +397,7 @@ declare module 'events' {
* @param eventName The name of the event.
* @param listener The callback function
*/
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this
* listener is removed, and then invoked.
@ -413,7 +413,7 @@ declare module 'events' {
* @param eventName The name of the event.
* @param listener The callback function
*/
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Returns an array listing the events for which the emitter has registered
* listeners. The values in the array are strings or `Symbol`s.

36
node_modules/@types/node/fs.d.ts generated vendored
View file

@ -2555,7 +2555,7 @@ declare module 'fs' {
* @since v0.1.29
* @param file filename or file descriptor
*/
export function writeFile(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
export function writeFile(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
/**
* Asynchronously writes data to a file, replacing the file if it already exists.
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@ -2586,7 +2586,7 @@ declare module 'fs' {
* @since v0.1.29
* @param file filename or file descriptor
*/
export function writeFileSync(path: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
export function writeFileSync(file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
/**
* Asynchronously append data to a file, creating the file if it does not yet
* exist. `data` can be a string or a `<Buffer>`.
@ -2638,7 +2638,7 @@ declare module 'fs' {
* @since v0.6.7
* @param path filename or file descriptor
*/
export function appendFile(file: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
export function appendFile(path: PathOrFileDescriptor, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
/**
* Asynchronously append data to a file, creating the file if it does not exist.
* @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
@ -2706,7 +2706,7 @@ declare module 'fs' {
* @since v0.6.7
* @param path filename or file descriptor
*/
export function appendFileSync(file: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
export function appendFileSync(path: PathOrFileDescriptor, data: string | Uint8Array, options?: WriteFileOptions): void;
/**
* Watch for changes on `filename`. The callback `listener` will be called each
* time the file is accessed.
@ -3479,31 +3479,9 @@ declare module 'fs' {
* @param mode modifiers for copy operation.
*/
export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
/**
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
* No arguments other than a possible exception are given to the callback function.
* Node.js makes no guarantees about the atomicity of the copy operation.
* If an error occurs after the destination file has been opened for writing, Node.js will attempt
* to remove the destination.
* @param src A path to the source file.
* @param dest A path to the destination file.
* @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
*/
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void;
export function copyFile(src: PathLike, dest: PathLike, mode: number, callback: NoParamCallback): void;
export namespace copyFile {
/**
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
* No arguments other than a possible exception are given to the callback function.
* Node.js makes no guarantees about the atomicity of the copy operation.
* If an error occurs after the destination file has been opened for writing, Node.js will attempt
* to remove the destination.
* @param src A path to the source file.
* @param dest A path to the destination file.
* @param flags An optional integer that specifies the behavior of the copy operation.
* The only supported flag is fs.constants.COPYFILE_EXCL,
* which causes the copy operation to fail if dest already exists.
*/
function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise<void>;
function __promisify__(src: PathLike, dst: PathLike, mode?: number): Promise<void>;
}
/**
* Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it
@ -3539,7 +3517,7 @@ declare module 'fs' {
* @param dest destination filename of the copy operation
* @param mode modifiers for copy operation.
*/
export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
export function copyFileSync(src: PathLike, dest: PathLike, mode?: number): void;
/**
* Write an array of `ArrayBufferView`s to the file specified by `fd` using`writev()`.
*

View file

@ -229,6 +229,41 @@ declare module 'fs/promises' {
* @since v10.0.0
*/
writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
/**
* Write `buffer` to the file.
*
* The promise is resolved with an object containing two properties:
*
* It is unsafe to use `filehandle.write()` multiple times on the same file
* without waiting for the promise to be resolved (or rejected). For this
* scenario, use `fs.createWriteStream()`.
*
* On Linux, positional writes do not work when the file is opened in append mode.
* The kernel ignores the position argument and always appends the data to
* the end of the file.
* @since v10.0.0
* @param offset The start position from within `buffer` where the data to write begins.
* @param length The number of bytes from `buffer` to write.
* @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
* See the POSIX pwrite(2) documentation for more detail.
*/
write<TBuffer extends Uint8Array>(
buffer: TBuffer,
offset?: number | null,
length?: number | null,
position?: number | null
): Promise<{
bytesWritten: number;
buffer: TBuffer;
}>;
write(
data: string,
position?: number | null,
encoding?: BufferEncoding | null
): Promise<{
bytesWritten: number;
buffer: string;
}>;
/**
* Write an array of [&lt;ArrayBufferView&gt;](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView)s to the file.
*
@ -338,7 +373,7 @@ declare module 'fs/promises' {
* `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`)
* @return Fulfills with `undefined` upon success.
*/
function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
function copyFile(src: PathLike, dest: PathLike, mode?: number): Promise<void>;
/**
* Opens a `<FileHandle>`.
*
@ -739,7 +774,7 @@ declare module 'fs/promises' {
* @return Fulfills with `undefined` upon success.
*/
function writeFile(
path: PathLike | FileHandle,
file: PathLike | FileHandle,
data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
options?:
| (ObjectEncodingOptions & {

View file

@ -1002,7 +1002,7 @@ declare module 'http2' {
* @param origins One or more URL Strings passed as separate arguments.
*/
origin(
...args: Array<
...origins: Array<
| string
| url.URL
| {

18
node_modules/@types/node/net.d.ts generated vendored
View file

@ -286,9 +286,9 @@ declare module 'net' {
* @param callback Optional callback for when the socket is finished.
* @return The socket itself.
*/
end(cb?: () => void): void;
end(buffer: Uint8Array | string, cb?: () => void): void;
end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): void;
end(callback?: () => void): void;
end(buffer: Uint8Array | string, callback?: () => void): void;
end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): void;
/**
* events.EventEmitter
* 1. close
@ -301,7 +301,7 @@ declare module 'net' {
* 8. timeout
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: (had_error: boolean) => void): this;
addListener(event: 'close', listener: (hadError: boolean) => void): this;
addListener(event: 'connect', listener: () => void): this;
addListener(event: 'data', listener: (data: Buffer) => void): this;
addListener(event: 'drain', listener: () => void): this;
@ -310,7 +310,7 @@ declare module 'net' {
addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
addListener(event: 'timeout', listener: () => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: 'close', had_error: boolean): boolean;
emit(event: 'close', hadError: boolean): boolean;
emit(event: 'connect'): boolean;
emit(event: 'data', data: Buffer): boolean;
emit(event: 'drain'): boolean;
@ -319,7 +319,7 @@ declare module 'net' {
emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
emit(event: 'timeout'): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'close', listener: (had_error: boolean) => void): this;
on(event: 'close', listener: (hadError: boolean) => void): this;
on(event: 'connect', listener: () => void): this;
on(event: 'data', listener: (data: Buffer) => void): this;
on(event: 'drain', listener: () => void): this;
@ -328,7 +328,7 @@ declare module 'net' {
on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
on(event: 'timeout', listener: () => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'close', listener: (had_error: boolean) => void): this;
once(event: 'close', listener: (hadError: boolean) => void): this;
once(event: 'connect', listener: () => void): this;
once(event: 'data', listener: (data: Buffer) => void): this;
once(event: 'drain', listener: () => void): this;
@ -337,7 +337,7 @@ declare module 'net' {
once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
once(event: 'timeout', listener: () => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: (had_error: boolean) => void): this;
prependListener(event: 'close', listener: (hadError: boolean) => void): this;
prependListener(event: 'connect', listener: () => void): this;
prependListener(event: 'data', listener: (data: Buffer) => void): this;
prependListener(event: 'drain', listener: () => void): this;
@ -346,7 +346,7 @@ declare module 'net' {
prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
prependListener(event: 'timeout', listener: () => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: (had_error: boolean) => void): this;
prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
prependOnceListener(event: 'connect', listener: () => void): this;
prependOnceListener(event: 'data', listener: (data: Buffer) => void): this;
prependOnceListener(event: 'drain', listener: () => void): this;

4
node_modules/@types/node/os.d.ts generated vendored
View file

@ -448,10 +448,6 @@ declare module 'os' {
* @param priority The scheduling priority to assign to the process.
*/
function setPriority(priority: number): void;
/**
* Sets the priority of the process specified process.
* @param priority Must be in range of -20 to 19
*/
function setPriority(pid: number, priority: number): void;
}
declare module 'node:os' {

View file

@ -1,6 +1,6 @@
{
"name": "@types/node",
"version": "16.4.3",
"version": "16.4.5",
"description": "TypeScript definitions for Node.js",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
"license": "MIT",
@ -232,6 +232,6 @@
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "7773c70431ea6e9c0933bf765366c8cdb469355d431747d11fab3a760e130912",
"typesPublisherContentHash": "98c66e97322cf8ea4701d26cb699718e44f01a3ac25a1096136e1f082c6c125a",
"typeScriptVersion": "3.6"
}

View file

@ -1126,7 +1126,7 @@ declare module 'process' {
* }
* ```
* @since v0.1.26
* @param ...args Additional arguments to pass when invoking the `callback`
* @param args Additional arguments to pass when invoking the `callback`
*/
nextTick(callback: Function, ...args: any[]): void;
/**

2
node_modules/@types/node/repl.d.ts generated vendored
View file

@ -312,7 +312,7 @@ declare module 'repl' {
* @param historyPath the path to the history file
* @param callback called when history writes are ready or upon error
*/
setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void;
setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
/**
* events.EventEmitter
* 1. close - inherited from `readline.Interface`

View file

@ -376,7 +376,7 @@ declare module 'stream' {
* @since v0.9.4
* @param stream An "old style" readable stream
*/
wrap(oldStream: NodeJS.ReadableStream): this;
wrap(stream: NodeJS.ReadableStream): this;
push(chunk: any, encoding?: BufferEncoding): boolean;
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
/**
@ -591,8 +591,8 @@ declare module 'stream' {
* @param callback Callback for when this chunk of data is flushed.
* @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
*/
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
/**
* The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
* @since v0.11.15

8
node_modules/@types/node/tls.d.ts generated vendored
View file

@ -560,7 +560,7 @@ declare module 'tls' {
* @param hostname A SNI host name or wildcard (e.g. `'*'`)
* @param context An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
*/
addContext(hostName: string, credentials: SecureContextOptions): void;
addContext(hostname: string, context: SecureContextOptions): void;
/**
* Returns the session ticket keys.
*
@ -575,7 +575,7 @@ declare module 'tls' {
* @since v11.0.0
* @param options An object containing any of the possible properties from the {@link createSecureContext} `options` arguments (e.g. `key`, `cert`, `ca`, etc).
*/
setSecureContext(details: SecureContextOptions): void;
setSecureContext(options: SecureContextOptions): void;
/**
* Sets the session ticket keys.
*
@ -825,7 +825,7 @@ declare module 'tls' {
* @param hostname The host name or IP address to verify the certificate against.
* @param cert A `certificate object` representing the peer's certificate.
*/
function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined;
function checkServerIdentity(hostname: string, cert: PeerCertificate): Error | undefined;
/**
* Creates a new {@link Server}. The `secureConnectionListener`, if provided, is
* automatically set as a listener for the `'secureConnection'` event.
@ -949,7 +949,7 @@ declare module 'tls' {
* @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
* @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
*/
function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
function createSecurePair(context?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
/**
* {@link createServer} sets the default value of the `honorCipherOrder` option
* to `true`, other APIs that create secure contexts leave it unset.

8
node_modules/@types/node/tty.d.ts generated vendored
View file

@ -155,7 +155,7 @@ declare module 'tty' {
* @since v9.9.0
* @param env An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
*/
getColorDepth(env?: {}): number;
getColorDepth(env?: object): number;
/**
* Returns `true` if the `writeStream` supports at least as many colors as provided
* in `count`. Minimum support is 2 (black and white).
@ -176,9 +176,9 @@ declare module 'tty' {
* @param count The number of colors that are requested (minimum 2).
* @param env An object containing the environment variables to check. This enables simulating the usage of a specific terminal.
*/
hasColors(depth?: number): boolean;
hasColors(env?: {}): boolean;
hasColors(depth: number, env?: {}): boolean;
hasColors(count?: number): boolean;
hasColors(env?: object): boolean;
hasColors(count: number, env?: object): boolean;
/**
* `writeStream.getWindowSize()` returns the size of the `TTY` corresponding to this `WriteStream`. The array is of the type`[numColumns, numRows]` where `numColumns` and `numRows` represent
* the number

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

@ -70,13 +70,10 @@ declare module 'url' {
* @param slashesDenoteHost If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the result
* would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
*/
function parse(urlStr: string): UrlWithStringQuery;
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
function parse(urlString: string): UrlWithStringQuery;
function parse(urlString: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
/**
* The `url.format()` method returns a formatted URL string derived from`urlObject`.
*
@ -140,8 +137,7 @@ declare module 'url' {
* @deprecated Legacy: Use the WHATWG URL API instead.
* @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
*/
function format(URL: URL, options?: URLFormatOptions): string;
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
function format(urlObject: URL, options?: URLFormatOptions): string;
function format(urlObject: UrlObject | string): string;
/**
* The `url.resolve()` method resolves a target URL relative to a base URL in a
@ -313,7 +309,7 @@ declare module 'url' {
* @param path The path to convert to a File URL.
* @return The file URL object.
*/
function pathToFileURL(url: string): URL;
function pathToFileURL(path: string): URL;
/**
* This utility function converts a URL object into an ordinary options object as
* expected by the `http.request()` and `https.request()` APIs.
@ -758,7 +754,7 @@ declare module 'url' {
* @param fn Invoked for each name-value pair in the query
* @param thisArg To be used as `this` value for when `fn` is called
*/
forEach(callback: (value: string, name: string, searchParams: this) => void): void;
forEach<TThis = this>(callback: (this: TThis, value: string, name: string, searchParams: this) => void, thisArg?: TThis): void;
/**
* Returns the value of the first name-value pair whose name is `name`. If there
* are no such pairs, `null` is returned.

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

@ -451,6 +451,10 @@ declare module 'util' {
* @deprecated Legacy: Use ES2015 class syntax and `extends` keyword instead.
*/
export function inherits(constructor: unknown, superConstructor: unknown): void;
export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
export interface DebugLogger extends DebugLoggerFunction {
enabled: boolean;
}
/**
* The `util.debuglog()` method is used to create a function that conditionally
* writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`environment variable. If the `section` name appears within the value of that
@ -508,7 +512,7 @@ declare module 'util' {
* @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
* @return The logging function
*/
export function debuglog(key: string): (msg: string, ...param: unknown[]) => void;
export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
/**
* Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.
*
@ -768,7 +772,7 @@ declare module 'util' {
* @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
* @return The deprecated function wrapped to emit a warning.
*/
export function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
export function deprecate<T extends Function>(fn: T, msg: string, code?: string): T;
/**
* Returns `true` if there is deep strict equality between `val1` and `val2`.
* Otherwise, returns `false`.
@ -1050,7 +1054,7 @@ declare module 'util' {
* @param src The text to encode.
* @param dest The array to hold the encode result.
*/
encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
}
}
declare module 'util/types' {

4
node_modules/@types/node/v8.d.ts generated vendored
View file

@ -217,7 +217,7 @@ declare module 'v8' {
* worker thread.
* @return The filename where the snapshot was saved.
*/
function writeHeapSnapshot(fileName?: string): string;
function writeHeapSnapshot(filename?: string): string;
/**
* Returns an object with the following properties:
*
@ -353,7 +353,7 @@ declare module 'v8' {
* @since v8.0.0
* @param buffer A buffer returned by {@link serialize}.
*/
function deserialize(data: NodeJS.TypedArray): any;
function deserialize(buffer: NodeJS.TypedArray): any;
/**
* The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
* times during the lifetime of the process. Each time the execution counter will

8
node_modules/@types/node/vm.d.ts generated vendored
View file

@ -191,7 +191,7 @@ declare module 'vm' {
* @param contextifiedObject A `contextified` object as returned by the `vm.createContext()` method.
* @return the result of the very last statement executed in the script.
*/
runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
runInContext(contextifiedObject: Context, options?: RunningScriptOptions): any;
/**
* First contextifies the given `contextObject`, runs the compiled code contained
* by the `vm.Script` object within the created context, and returns the result.
@ -218,7 +218,7 @@ declare module 'vm' {
* @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
* @return the result of the very last statement executed in the script.
*/
runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
runInNewContext(contextObject?: Context, options?: RunningScriptOptions): any;
/**
* Runs the compiled code contained by the `vm.Script` within the context of the
* current `global` object. Running code does not have access to local scope, but_does_ have access to the current `global` object.
@ -340,7 +340,7 @@ declare module 'vm' {
* @param contextifiedObject The `contextified` object that will be used as the `global` when the `code` is compiled and run.
* @return the result of the very last statement executed in the script.
*/
function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
function runInContext(code: string, contextifiedObject: Context, options?: RunningScriptOptions | string): any;
/**
* The `vm.runInNewContext()` first contextifies the given `contextObject` (or
* creates a new `contextObject` if passed as `undefined`), compiles the `code`,
@ -369,7 +369,7 @@ declare module 'vm' {
* @param contextObject An object that will be `contextified`. If `undefined`, a new object will be created.
* @return the result of the very last statement executed in the script.
*/
function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
function runInNewContext(code: string, contextObject?: Context, options?: RunningScriptOptions | string): any;
/**
* `vm.runInThisContext()` compiles `code`, runs it within the context of the
* current `global` and returns the result. Running code does not have access to

View file

@ -583,7 +583,7 @@ declare module 'worker_threads' {
* @param port The message port to transfer.
* @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method.
*/
function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort;
/**
* Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
* that contains the message payload, corresponding to the oldest message in the`MessagePort`s queue.