Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions types/node/buffer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ declare module "buffer" {
* Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
* conversion from `fromEnc` to `toEnc` is not permitted.
*
* Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
* Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
*
* The transcoding process will use substitution characters if a given byte
* sequence cannot be adequately represented in the target encoding. For instance:
Expand Down Expand Up @@ -781,7 +781,7 @@ declare module "buffer" {
* // (This result is equal to: [buf1, buf3, buf2].)
* ```
*
* The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
* The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively.
*
* ```js
* import { Buffer } from 'node:buffer';
Expand All @@ -797,7 +797,7 @@ declare module "buffer" {
* // Prints: 1
* ```
*
* `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
* `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
* @since v0.11.13
* @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
* @param [targetStart=0] The offset within `target` at which to begin comparison.
Expand Down Expand Up @@ -1215,7 +1215,7 @@ declare module "buffer" {
*/
readBigInt64LE(offset?: number): bigint;
/**
* Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
* Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting
* up to 48 bits of accuracy.
*
* This function is also available under the `readUintLE` alias.
Expand All @@ -1239,7 +1239,7 @@ declare module "buffer" {
*/
readUintLE(offset: number, byteLength: number): number;
/**
* Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
* Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting
* up to 48 bits of accuracy.
*
* This function is also available under the `readUintBE` alias.
Expand All @@ -1265,7 +1265,7 @@ declare module "buffer" {
*/
readUintBE(offset: number, byteLength: number): number;
/**
* Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
* Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value
* supporting up to 48 bits of accuracy.
*
* ```js
Expand All @@ -1282,7 +1282,7 @@ declare module "buffer" {
*/
readIntLE(offset: number, byteLength: number): number;
/**
* Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
* Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value
* supporting up to 48 bits of accuracy.
*
* ```js
Expand Down Expand Up @@ -1329,7 +1329,7 @@ declare module "buffer" {
*/
readUint8(offset?: number): number;
/**
* Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
* Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
*
* This function is also available under the `readUint16LE` alias.
*
Expand Down Expand Up @@ -1702,7 +1702,7 @@ declare module "buffer" {
*/
writeUint8(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
* anything other than an unsigned 16-bit integer.
*
* This function is also available under the `writeUint16LE` alias.
Expand Down Expand Up @@ -1730,7 +1730,7 @@ declare module "buffer" {
*/
writeUint16LE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
* unsigned 16-bit integer.
*
* This function is also available under the `writeUint16BE` alias.
Expand Down Expand Up @@ -1758,7 +1758,7 @@ declare module "buffer" {
*/
writeUint16BE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
* anything other than an unsigned 32-bit integer.
*
* This function is also available under the `writeUint32LE` alias.
Expand All @@ -1785,7 +1785,7 @@ declare module "buffer" {
*/
writeUint32LE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
* unsigned 32-bit integer.
*
* This function is also available under the `writeUint32BE` alias.
Expand Down Expand Up @@ -1836,7 +1836,7 @@ declare module "buffer" {
*/
writeInt8(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
* anything other than a signed 16-bit integer.
*
* The `value` is interpreted and written as a two's complement signed integer.
Expand All @@ -1858,7 +1858,7 @@ declare module "buffer" {
*/
writeInt16LE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
* anything other than a signed 16-bit integer.
*
* The `value` is interpreted and written as a two's complement signed integer.
Expand All @@ -1880,7 +1880,7 @@ declare module "buffer" {
*/
writeInt16BE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
* anything other than a signed 32-bit integer.
*
* The `value` is interpreted and written as a two's complement signed integer.
Expand All @@ -1902,7 +1902,7 @@ declare module "buffer" {
*/
writeInt32LE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
* anything other than a signed 32-bit integer.
*
* The `value` is interpreted and written as a two's complement signed integer.
Expand Down Expand Up @@ -1964,7 +1964,7 @@ declare module "buffer" {
*/
writeFloatBE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
* Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
* other than a JavaScript number.
*
* ```js
Expand All @@ -1984,7 +1984,7 @@ declare module "buffer" {
*/
writeDoubleLE(value: number, offset?: number): number;
/**
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
* Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
* other than a JavaScript number.
*
* ```js
Expand Down Expand Up @@ -2066,7 +2066,7 @@ declare module "buffer" {
/**
* If `value` is:
*
* * a string, `value` is interpreted according to the character encoding in`encoding`.
* * a string, `value` is interpreted according to the character encoding in `encoding`.
* * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
* To compare a partial `Buffer`, use `buf.subarray`.
* * a number, `value` will be interpreted as an unsigned 8-bit integer
Expand Down Expand Up @@ -2164,7 +2164,7 @@ declare module "buffer" {
* // Prints: 4
* ```
*
* If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
* If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
* an integer between 0 and 255.
*
* If `byteOffset` is not a number, it will be coerced to a number. Any arguments
Expand Down Expand Up @@ -2323,7 +2323,7 @@ declare module "buffer" {
* **and should never be used in new code, because they use strings to represent**
* **binary data and predate the introduction of typed arrays in JavaScript.**
* **For code running using Node.js APIs, converting between base64-encoded strings**
* **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
* **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
* @since v15.13.0, v14.17.0
* @legacy Use `Buffer.from(data, 'base64')` instead.
* @param data The Base64-encoded input string.
Expand All @@ -2339,7 +2339,7 @@ declare module "buffer" {
* **and should never be used in new code, because they use strings to represent**
* **binary data and predate the introduction of typed arrays in JavaScript.**
* **For code running using Node.js APIs, converting between base64-encoded strings**
* **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
* **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
* @since v15.13.0, v14.17.0
* @legacy Use `buf.toString('base64')` instead.
* @param data An ASCII (Latin1) string.
Expand Down
6 changes: 3 additions & 3 deletions types/node/child_process.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ declare module "child_process" {
* `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
* refer to the same value.
*
* The `subprocess.stdin` property can be `null` or `undefined`if the child process could not be successfully spawned.
* The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned.
* @since v0.1.90
*/
stdin: Writable | null;
Expand All @@ -118,7 +118,7 @@ declare module "child_process" {
* });
* ```
*
* The `subprocess.stdout` property can be `null` or `undefined`if the child process could not be successfully spawned.
* The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.
* @since v0.1.90
*/
stdout: Readable | null;
Expand All @@ -131,7 +131,7 @@ declare module "child_process" {
* `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
* refer to the same value.
*
* The `subprocess.stderr` property can be `null` or `undefined`if the child process could not be successfully spawned.
* The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned.
* @since v0.1.90
*/
stderr: Readable | null;
Expand Down
Loading