Skip to content

Commit

Permalink
fix(48557): Add missing JSDoc parameters (microsoft#48560)
Browse files Browse the repository at this point in the history
* Fix jsdoc of some `DataView` method.

* Add author by 'Fix jsdoc of some `DataView` method'.

* Fix jsdoc of some `DataView` method.

change 'written' to 'read' by `getXXX` methods, and remove 'otherwise' by every method which has `littleEndian` param.

* Fix jsdoc of some `DataView` method in `es2020.bigint.d.ts`.

change 'written' to 'read' by `getXXX` methods, and remove 'otherwise' by every method which has `littleEndian` param.
  • Loading branch information
那里好脏不可以 authored May 2, 2022
1 parent e73d755 commit bb887ea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ TypeScript is authored by:
- Gabriel Isenberg
- Gabriela Araujo Britto
- Gabriela Britto
- Gao Sheng
- gb714us
- Gilad Peleg
- Godfrey Chan
Expand Down
8 changes: 4 additions & 4 deletions src/lib/es2020.bigint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -673,31 +673,31 @@ interface DataView {
* Gets the BigInt64 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;

/**
* Gets the BigUint64 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;

/**
* Stores a BigInt64 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;

/**
* Stores a BigUint64 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
}
Expand Down
24 changes: 12 additions & 12 deletions src/lib/es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1669,13 +1669,15 @@ interface DataView {
* Gets the Float32 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getFloat32(byteOffset: number, littleEndian?: boolean): number;

/**
* Gets the Float64 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getFloat64(byteOffset: number, littleEndian?: boolean): number;

Expand All @@ -1690,12 +1692,14 @@ interface DataView {
* Gets the Int16 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getInt16(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Int32 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getInt32(byteOffset: number, littleEndian?: boolean): number;

Expand All @@ -1710,31 +1714,31 @@ interface DataView {
* Gets the Uint16 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getUint16(byteOffset: number, littleEndian?: boolean): number;

/**
* Gets the Uint32 value at the specified byte offset from the start of the view. There is
* no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
* @param littleEndian If false or undefined, a big-endian value should be read.
*/
getUint32(byteOffset: number, littleEndian?: boolean): number;

/**
* Stores an Float32 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;

/**
* Stores an Float64 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;

Expand All @@ -1749,17 +1753,15 @@ interface DataView {
* Stores an Int16 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;

/**
* Stores an Int32 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;

Expand All @@ -1774,17 +1776,15 @@ interface DataView {
* Stores an Uint16 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;

/**
* Stores an Uint32 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
* @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
* @param littleEndian If false or undefined, a big-endian value should be written.
*/
setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
}
Expand Down

0 comments on commit bb887ea

Please sign in to comment.