Skip to content

Commit bb887ea

Browse files
author
那里好脏不可以
authored
fix(48557): Add missing JSDoc parameters (#48560)
* 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.
1 parent e73d755 commit bb887ea

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ TypeScript is authored by:
169169
- Gabriel Isenberg
170170
- Gabriela Araujo Britto
171171
- Gabriela Britto
172+
- Gao Sheng
172173
- gb714us
173174
- Gilad Peleg
174175
- Godfrey Chan

src/lib/es2020.bigint.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,31 +673,31 @@ interface DataView {
673673
* Gets the BigInt64 value at the specified byte offset from the start of the view. There is
674674
* no alignment constraint; multi-byte values may be fetched from any offset.
675675
* @param byteOffset The place in the buffer at which the value should be retrieved.
676+
* @param littleEndian If false or undefined, a big-endian value should be read.
676677
*/
677678
getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;
678679

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

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

695696
/**
696697
* Stores a BigUint64 value at the specified byte offset from the start of the view.
697698
* @param byteOffset The place in the buffer at which the value should be set.
698699
* @param value The value to set.
699-
* @param littleEndian If false or undefined, a big-endian value should be written,
700-
* otherwise a little-endian value should be written.
700+
* @param littleEndian If false or undefined, a big-endian value should be written.
701701
*/
702702
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
703703
}

src/lib/es5.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,13 +1669,15 @@ interface DataView {
16691669
* Gets the Float32 value at the specified byte offset from the start of the view. There is
16701670
* no alignment constraint; multi-byte values may be fetched from any offset.
16711671
* @param byteOffset The place in the buffer at which the value should be retrieved.
1672+
* @param littleEndian If false or undefined, a big-endian value should be read.
16721673
*/
16731674
getFloat32(byteOffset: number, littleEndian?: boolean): number;
16741675

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

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)