bireader 4.0.4 → 4.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -824,25 +824,25 @@ declare class BiBase<DataType, alwaysBigInt> {
824
824
  * @param {number} startOffset - Start location (default 0)
825
825
  * @param {number} endOffset - End location (default current position)
826
826
  * @param {boolean} consume - Move position to end of removed data (default false)
827
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
827
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
828
828
  */
829
- delete(startOffset?: number, endOffset?: number, consume?: boolean): DataType;
829
+ delete(startOffset?: number, endOffset?: number, consume?: boolean): ReturnMapping<DataType>;
830
830
  /**
831
831
  * Deletes part of data from current byte position to end, returns removed.
832
832
  *
833
833
  * Note: Errors in strict mode.
834
834
  *
835
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
835
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
836
836
  */
837
- clip(): DataType;
837
+ clip(): ReturnMapping<DataType>;
838
838
  /**
839
839
  * Deletes part of data from current byte position to end, returns removed.
840
840
  *
841
841
  * Note: Errors in strict mode.
842
842
  *
843
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
843
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
844
844
  */
845
- trim(): DataType;
845
+ trim(): ReturnMapping<DataType>;
846
846
  /**
847
847
  * Deletes part of data from current byte position to supplied length, returns removed.
848
848
  *
@@ -850,9 +850,9 @@ declare class BiBase<DataType, alwaysBigInt> {
850
850
  *
851
851
  * @param {number} length - Length of data in bytes to remove
852
852
  * @param {boolean} consume - Move position to end of removed data (default false)
853
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
853
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
854
854
  */
855
- crop(length?: number, consume?: boolean): DataType;
855
+ crop(length?: number, consume?: boolean): ReturnMapping<DataType>;
856
856
  /**
857
857
  * Deletes part of data from current position to supplied length, returns removed.
858
858
  *
@@ -860,29 +860,29 @@ declare class BiBase<DataType, alwaysBigInt> {
860
860
  *
861
861
  * @param {number} length - Length of data in bytes to remove
862
862
  * @param {boolean} consume - Move position to end of removed data (default false)
863
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
863
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
864
864
  */
865
- drop(length?: number, consume?: boolean): DataType;
865
+ drop(length?: number, consume?: boolean): ReturnMapping<DataType>;
866
866
  /**
867
867
  * Replaces data in data.
868
868
  *
869
869
  * Note: Errors on strict mode if past end of data.
870
870
  *
871
- * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to replace in data
871
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
872
872
  * @param {number} offset - Offset to add it at (defaults to current position)
873
873
  * @param {boolean} consume - Move current byte position to end of data (default false)
874
874
  */
875
- replace(data: ReturnMapping<DataType>, offset?: number, consume?: boolean): void;
875
+ replace(data: Uint8Array | Buffer, offset?: number, consume?: boolean): void;
876
876
  /**
877
877
  * Replaces data in data.
878
878
  *
879
879
  * Note: Errors on strict mode.
880
880
  *
881
- * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to replace in data
881
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
882
882
  * @param {number} offset - Offset to add it at (defaults to current position)
883
883
  * @param {boolean} consume - Move current byte position to end of data (default false)
884
884
  */
885
- overwrite(data: ReturnMapping<DataType>, offset?: number, consume?: boolean): void;
885
+ overwrite(data: Uint8Array | Buffer, offset?: number, consume?: boolean): void;
886
886
  /**
887
887
  * Returns part of data from current byte position to end of data unless supplied.
888
888
  *
@@ -890,9 +890,9 @@ declare class BiBase<DataType, alwaysBigInt> {
890
890
  * @param {number} endOffset - End location (default end of data)
891
891
  * @param {boolean} consume - Move position to end of lifted data (default false)
892
892
  * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
893
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
893
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
894
894
  */
895
- fill(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): DataType;
895
+ fill(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): ReturnMapping<DataType>;
896
896
  /**
897
897
  * Returns part of data from current byte position to end of data unless supplied.
898
898
  *
@@ -900,9 +900,9 @@ declare class BiBase<DataType, alwaysBigInt> {
900
900
  * @param {number} endOffset - End location (default end of data)
901
901
  * @param {boolean} consume - Move position to end of lifted data (default false)
902
902
  * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
903
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
903
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
904
904
  */
905
- lift(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): DataType;
905
+ lift(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): ReturnMapping<DataType>;
906
906
  /**
907
907
  * Extract data from current position to length supplied.
908
908
  *
@@ -910,9 +910,9 @@ declare class BiBase<DataType, alwaysBigInt> {
910
910
  *
911
911
  * @param {number} length - Length of data in bytes to copy from current offset
912
912
  * @param {number} consume - Moves offset to end of length (default false)
913
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
913
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
914
914
  */
915
- extract(length?: number, consume?: boolean): DataType;
915
+ extract(length?: number, consume?: boolean): ReturnMapping<DataType>;
916
916
  /**
917
917
  * Extract data from current position to length supplied.
918
918
  *
@@ -920,9 +920,9 @@ declare class BiBase<DataType, alwaysBigInt> {
920
920
  *
921
921
  * @param {number} length - Length of data in bytes to copy from current offset
922
922
  * @param {number} consume - Moves offset to end of length (default false)
923
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
923
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
924
924
  */
925
- slice(length?: number, consume?: boolean): DataType;
925
+ slice(length?: number, consume?: boolean): ReturnMapping<DataType>;
926
926
  /**
927
927
  * Extract data from current position to length supplied.
928
928
  *
@@ -930,9 +930,9 @@ declare class BiBase<DataType, alwaysBigInt> {
930
930
  *
931
931
  * @param {number} length - Length of data in bytes to copy from current offset
932
932
  * @param {number} consume - Moves offset to end of length (default false)
933
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
933
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
934
934
  */
935
- wrap(length?: number, consume?: boolean): DataType;
935
+ wrap(length?: number, consume?: boolean): ReturnMapping<DataType>;
936
936
  /**
937
937
  * Inserts data into data.
938
938
  *
@@ -7509,21 +7509,21 @@ declare class BiBaseAsync<DataType, alwaysBigInt> {
7509
7509
  *
7510
7510
  * Note: Errors on strict mode.
7511
7511
  *
7512
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to replace in data
7512
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
7513
7513
  * @param {number} offset - Offset to add it at (defaults to current position)
7514
7514
  * @param {boolean} consume - Move current byte position to end of data (default false)
7515
7515
  */
7516
- replace(data: DataType, offset?: number, consume?: boolean): Promise<ReturnMapping<DataType>>;
7516
+ replace(data: Uint8Array | Buffer, offset?: number, consume?: boolean): Promise<ReturnMapping<DataType>>;
7517
7517
  /**
7518
7518
  * Replaces data in data.
7519
7519
  *
7520
7520
  * Note: Errors on strict mode.
7521
7521
  *
7522
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to replace in data
7522
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
7523
7523
  * @param {number} offset - Offset to add it at (defaults to current position)
7524
7524
  * @param {boolean} consume - Move current byte position to end of data (default false)
7525
7525
  */
7526
- overwrite(data: DataType, offset?: number, consume?: boolean): Promise<ReturnMapping<DataType>>;
7526
+ overwrite(data: Uint8Array | Buffer, offset?: number, consume?: boolean): Promise<ReturnMapping<DataType>>;
7527
7527
  /**
7528
7528
  * Returns part of data from current byte position to end of data unless supplied.
7529
7529
  *
@@ -7532,7 +7532,7 @@ declare class BiBaseAsync<DataType, alwaysBigInt> {
7532
7532
  * @param {boolean} consume - Move position to end of lifted data (default false)
7533
7533
  * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
7534
7534
  */
7535
- fill(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): Promise<DataType>;
7535
+ fill(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): Promise<DataType | ReturnMapping<DataType>>;
7536
7536
  /**
7537
7537
  * Returns part of data from current byte position to end of data unless supplied.
7538
7538
  *
@@ -7541,7 +7541,7 @@ declare class BiBaseAsync<DataType, alwaysBigInt> {
7541
7541
  * @param {boolean} consume - Move position to end of lifted data (default false)
7542
7542
  * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
7543
7543
  */
7544
- lift(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): Promise<DataType>;
7544
+ lift(startOffset?: number, endOffset?: number, consume?: boolean, fillValue?: number): Promise<ReturnMapping<DataType>>;
7545
7545
  /**
7546
7546
  * Extract data from current position to length supplied.
7547
7547
  *
@@ -7550,7 +7550,7 @@ declare class BiBaseAsync<DataType, alwaysBigInt> {
7550
7550
  * @param {number} length - Length of data in bytes to copy from current offset
7551
7551
  * @param {number} consume - Moves offset to end of length
7552
7552
  */
7553
- extract(length?: number, consume?: boolean): Promise<DataType>;
7553
+ extract(length?: number, consume?: boolean): Promise<DataType | ReturnMapping<DataType>>;
7554
7554
  /**
7555
7555
  * Extract data from current position to length supplied.
7556
7556
  *
@@ -7559,7 +7559,7 @@ declare class BiBaseAsync<DataType, alwaysBigInt> {
7559
7559
  * @param {number} length - Length of data in bytes to copy from current offset
7560
7560
  * @param {number} consume - Moves offset to end of length
7561
7561
  */
7562
- slice(length?: number, consume?: boolean): Promise<DataType>;
7562
+ slice(length?: number, consume?: boolean): Promise<DataType | ReturnMapping<DataType>>;
7563
7563
  /**
7564
7564
  * Extract data from current position to length supplied.
7565
7565
  *
@@ -7568,63 +7568,63 @@ declare class BiBaseAsync<DataType, alwaysBigInt> {
7568
7568
  * @param {number} length - Length of data in bytes to copy from current offset
7569
7569
  * @param {number} consume - Moves offset to end of length
7570
7570
  */
7571
- wrap(length?: number, consume?: boolean): Promise<DataType>;
7571
+ wrap(length?: number, consume?: boolean): Promise<DataType | ReturnMapping<DataType>>;
7572
7572
  /**
7573
7573
  * Inserts data into data.
7574
7574
  *
7575
7575
  * Note: Errors on strict mode.
7576
7576
  *
7577
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
7577
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
7578
7578
  * @param {number} offset - Byte position to add at (defaults to current position)
7579
7579
  * @param {boolean} consume - Move current byte position to end of data (default true)
7580
7580
  */
7581
- insert(data: DataType, offset?: number, consume?: boolean): Promise<void>;
7581
+ insert(data: ReturnMapping<DataType>, offset?: number, consume?: boolean): Promise<void>;
7582
7582
  /**
7583
7583
  * Inserts data into data.
7584
7584
  *
7585
7585
  * Note: Errors on strict mode.
7586
7586
  *
7587
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
7587
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
7588
7588
  * @param {number} offset - Byte position to add at (defaults to current position)
7589
7589
  * @param {boolean} consume - Move current byte position to end of data (default true)
7590
7590
  */
7591
- place(data: DataType, offset?: number, consume?: boolean): Promise<void>;
7591
+ place(data: ReturnMapping<DataType>, offset?: number, consume?: boolean): Promise<void>;
7592
7592
  /**
7593
7593
  * Adds data to start of supplied data.
7594
7594
  *
7595
7595
  * Note: Errors on strict mode.
7596
7596
  *
7597
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
7597
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
7598
7598
  * @param {boolean} consume - Move current write position to end of data (default false)
7599
7599
  */
7600
- unshift(data: DataType, consume?: boolean): Promise<void>;
7600
+ unshift(data: ReturnMapping<DataType>, consume?: boolean): Promise<void>;
7601
7601
  /**
7602
7602
  * Adds data to start of supplied data.
7603
7603
  *
7604
7604
  * Note: Errors on strict mode.
7605
7605
  *
7606
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
7606
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
7607
7607
  * @param {boolean} consume - Move current write position to end of data (default false)
7608
7608
  */
7609
- prepend(data: DataType, consume?: boolean): Promise<void>;
7609
+ prepend(data: ReturnMapping<DataType>, consume?: boolean): Promise<void>;
7610
7610
  /**
7611
7611
  * Adds data to end of supplied data.
7612
7612
  *
7613
7613
  * Note: Errors on strict mode.
7614
7614
  *
7615
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
7615
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
7616
7616
  * @param {boolean} consume - Move current write position to end of data (default false)
7617
7617
  */
7618
- push(data: DataType, consume?: boolean): Promise<void>;
7618
+ push(data: ReturnMapping<DataType>, consume?: boolean): Promise<void>;
7619
7619
  /**
7620
7620
  * Adds data to end of supplied data.
7621
7621
  *
7622
7622
  * Note: Errors on strict mode.
7623
7623
  *
7624
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
7624
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
7625
7625
  * @param {boolean} consume - Move current write position to end of data (default false)
7626
7626
  */
7627
- append(data: DataType, consume?: boolean): Promise<void>;
7627
+ append(data: ReturnMapping<DataType>, consume?: boolean): Promise<void>;
7628
7628
  /**
7629
7629
  * XOR data.
7630
7630
  *
package/dist/cjs/index.js CHANGED
@@ -2596,7 +2596,7 @@ class BiBase {
2596
2596
  * @param {number} startOffset - Start location (default 0)
2597
2597
  * @param {number} endOffset - End location (default current position)
2598
2598
  * @param {boolean} consume - Move position to end of removed data (default false)
2599
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
2599
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
2600
2600
  */
2601
2601
  delete(startOffset = 0, endOffset = __classPrivateFieldGet(this, _BiBase_offset, "f"), consume = false) {
2602
2602
  if (this.readOnly || this.strict) {
@@ -2632,7 +2632,7 @@ class BiBase {
2632
2632
  *
2633
2633
  * Note: Errors in strict mode.
2634
2634
  *
2635
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
2635
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
2636
2636
  */
2637
2637
  clip() {
2638
2638
  return this.delete(__classPrivateFieldGet(this, _BiBase_offset, "f"), this.size, false);
@@ -2643,7 +2643,7 @@ class BiBase {
2643
2643
  *
2644
2644
  * Note: Errors in strict mode.
2645
2645
  *
2646
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
2646
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
2647
2647
  */
2648
2648
  trim() {
2649
2649
  return this.delete(__classPrivateFieldGet(this, _BiBase_offset, "f"), this.size, false);
@@ -2656,7 +2656,7 @@ class BiBase {
2656
2656
  *
2657
2657
  * @param {number} length - Length of data in bytes to remove
2658
2658
  * @param {boolean} consume - Move position to end of removed data (default false)
2659
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
2659
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
2660
2660
  */
2661
2661
  crop(length = 0, consume = false) {
2662
2662
  return this.delete(__classPrivateFieldGet(this, _BiBase_offset, "f"), __classPrivateFieldGet(this, _BiBase_offset, "f") + length, consume);
@@ -2669,7 +2669,7 @@ class BiBase {
2669
2669
  *
2670
2670
  * @param {number} length - Length of data in bytes to remove
2671
2671
  * @param {boolean} consume - Move position to end of removed data (default false)
2672
- * @returns {DataType} Removed data as ``Buffer`` or ``Uint8Array``
2672
+ * @returns {ReturnMapping<DataType>} Removed data as ``Buffer`` or ``Uint8Array``
2673
2673
  */
2674
2674
  drop(length = 0, consume = false) {
2675
2675
  return this.delete(__classPrivateFieldGet(this, _BiBase_offset, "f"), __classPrivateFieldGet(this, _BiBase_offset, "f") + length, consume);
@@ -2683,7 +2683,7 @@ class BiBase {
2683
2683
  *
2684
2684
  * Note: Errors on strict mode if past end of data.
2685
2685
  *
2686
- * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to replace in data
2686
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
2687
2687
  * @param {number} offset - Offset to add it at (defaults to current position)
2688
2688
  * @param {boolean} consume - Move current byte position to end of data (default false)
2689
2689
  */
@@ -2734,7 +2734,7 @@ class BiBase {
2734
2734
  *
2735
2735
  * Note: Errors on strict mode.
2736
2736
  *
2737
- * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to replace in data
2737
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
2738
2738
  * @param {number} offset - Offset to add it at (defaults to current position)
2739
2739
  * @param {boolean} consume - Move current byte position to end of data (default false)
2740
2740
  */
@@ -2752,7 +2752,7 @@ class BiBase {
2752
2752
  * @param {number} endOffset - End location (default end of data)
2753
2753
  * @param {boolean} consume - Move position to end of lifted data (default false)
2754
2754
  * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
2755
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
2755
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
2756
2756
  */
2757
2757
  fill(startOffset = __classPrivateFieldGet(this, _BiBase_offset, "f"), endOffset = this.size, consume = false, fillValue) {
2758
2758
  if (this.readOnly) {
@@ -2815,7 +2815,7 @@ class BiBase {
2815
2815
  * @param {number} endOffset - End location (default end of data)
2816
2816
  * @param {boolean} consume - Move position to end of lifted data (default false)
2817
2817
  * @param {number} fillValue - Byte value to to fill returned data (does NOT fill unless supplied)
2818
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
2818
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
2819
2819
  */
2820
2820
  lift(startOffset = __classPrivateFieldGet(this, _BiBase_offset, "f"), endOffset = this.size, consume = false, fillValue) {
2821
2821
  return this.fill(startOffset, endOffset, consume, fillValue);
@@ -2828,7 +2828,7 @@ class BiBase {
2828
2828
  *
2829
2829
  * @param {number} length - Length of data in bytes to copy from current offset
2830
2830
  * @param {number} consume - Moves offset to end of length (default false)
2831
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
2831
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
2832
2832
  */
2833
2833
  extract(length = 0, consume = false) {
2834
2834
  return this.fill(__classPrivateFieldGet(this, _BiBase_offset, "f"), __classPrivateFieldGet(this, _BiBase_offset, "f") + length, consume);
@@ -2841,7 +2841,7 @@ class BiBase {
2841
2841
  *
2842
2842
  * @param {number} length - Length of data in bytes to copy from current offset
2843
2843
  * @param {number} consume - Moves offset to end of length (default false)
2844
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
2844
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
2845
2845
  */
2846
2846
  slice(length = 0, consume = false) {
2847
2847
  return this.fill(__classPrivateFieldGet(this, _BiBase_offset, "f"), __classPrivateFieldGet(this, _BiBase_offset, "f") + length, consume);
@@ -2854,7 +2854,7 @@ class BiBase {
2854
2854
  *
2855
2855
  * @param {number} length - Length of data in bytes to copy from current offset
2856
2856
  * @param {number} consume - Moves offset to end of length (default false)
2857
- * @returns {DataType} Selected data as ``Uint8Array`` or ``Buffer``
2857
+ * @returns {ReturnMapping<DataType>} Selected data as ``Uint8Array`` or ``Buffer``
2858
2858
  */
2859
2859
  wrap(length = 0, consume = false) {
2860
2860
  return this.fill(__classPrivateFieldGet(this, _BiBase_offset, "f"), __classPrivateFieldGet(this, _BiBase_offset, "f") + length, consume);
@@ -13532,7 +13532,7 @@ class BiBaseAsync {
13532
13532
  *
13533
13533
  * Note: Errors on strict mode.
13534
13534
  *
13535
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to replace in data
13535
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
13536
13536
  * @param {number} offset - Offset to add it at (defaults to current position)
13537
13537
  * @param {boolean} consume - Move current byte position to end of data (default false)
13538
13538
  */
@@ -13590,7 +13590,7 @@ class BiBaseAsync {
13590
13590
  *
13591
13591
  * Note: Errors on strict mode.
13592
13592
  *
13593
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to replace in data
13593
+ * @param {Uint8Array | Buffer} data - ``Uint8Array`` or ``Buffer`` to replace in data
13594
13594
  * @param {number} offset - Offset to add it at (defaults to current position)
13595
13595
  * @param {boolean} consume - Move current byte position to end of data (default false)
13596
13596
  */
@@ -13724,7 +13724,7 @@ class BiBaseAsync {
13724
13724
  *
13725
13725
  * Note: Errors on strict mode.
13726
13726
  *
13727
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
13727
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
13728
13728
  * @param {number} offset - Byte position to add at (defaults to current position)
13729
13729
  * @param {boolean} consume - Move current byte position to end of data (default true)
13730
13730
  */
@@ -13789,7 +13789,7 @@ class BiBaseAsync {
13789
13789
  *
13790
13790
  * Note: Errors on strict mode.
13791
13791
  *
13792
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
13792
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
13793
13793
  * @param {number} offset - Byte position to add at (defaults to current position)
13794
13794
  * @param {boolean} consume - Move current byte position to end of data (default true)
13795
13795
  */
@@ -13802,7 +13802,7 @@ class BiBaseAsync {
13802
13802
  *
13803
13803
  * Note: Errors on strict mode.
13804
13804
  *
13805
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
13805
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
13806
13806
  * @param {boolean} consume - Move current write position to end of data (default false)
13807
13807
  */
13808
13808
  async unshift(data, consume = false) {
@@ -13814,7 +13814,7 @@ class BiBaseAsync {
13814
13814
  *
13815
13815
  * Note: Errors on strict mode.
13816
13816
  *
13817
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
13817
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
13818
13818
  * @param {boolean} consume - Move current write position to end of data (default false)
13819
13819
  */
13820
13820
  async prepend(data, consume = false) {
@@ -13826,7 +13826,7 @@ class BiBaseAsync {
13826
13826
  *
13827
13827
  * Note: Errors on strict mode.
13828
13828
  *
13829
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
13829
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
13830
13830
  * @param {boolean} consume - Move current write position to end of data (default false)
13831
13831
  */
13832
13832
  async push(data, consume = false) {
@@ -13838,7 +13838,7 @@ class BiBaseAsync {
13838
13838
  *
13839
13839
  * Note: Errors on strict mode.
13840
13840
  *
13841
- * @param {DataType} data - ``Uint8Array`` or ``Buffer`` to add to data
13841
+ * @param {ReturnMapping<DataType>} data - ``Uint8Array`` or ``Buffer`` to add to data
13842
13842
  * @param {boolean} consume - Move current write position to end of data (default false)
13843
13843
  */
13844
13844
  async append(data, consume = false) {