@types/node 16.4.8 → 16.4.12

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.
node/README.md CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 30 Jul 2021 21:31:20 GMT
11
+ * Last updated: Wed, 04 Aug 2021 16:31:27 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), and [NodeJS Contributors](https://github.com/NodeJS).
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), and [Linus Unnebäck](https://github.com/LinusU).
node/assert.d.ts CHANGED
@@ -72,6 +72,8 @@ declare module 'assert' {
72
72
  * const callsfunc = tracker.calls(func);
73
73
  * ```
74
74
  * @since v14.2.0, v12.19.0
75
+ * @param [fn='A no-op function']
76
+ * @param [exact=1]
75
77
  * @return that wraps `fn`.
76
78
  */
77
79
  calls(exact?: number): () => void;
@@ -228,6 +230,7 @@ declare module 'assert' {
228
230
  * Using `assert.fail()` with more than two arguments is possible but deprecated.
229
231
  * See below for further details.
230
232
  * @since v0.1.21
233
+ * @param [message='Failed']
231
234
  */
232
235
  function fail(message?: string | Error): never;
233
236
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
node/buffer.d.ts CHANGED
@@ -330,9 +330,9 @@ declare module 'buffer' {
330
330
  * ```
331
331
  * @since v0.1.90
332
332
  * @param string String to write to `buf`.
333
- * @param offset Number of bytes to skip before starting to write `string`.
334
- * @param length Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
335
- * @param encoding The character encoding of `string`.
333
+ * @param [offset=0] Number of bytes to skip before starting to write `string`.
334
+ * @param [length=buf.length - offset] Maximum number of bytes to write (written bytes will not exceed `buf.length - offset`).
335
+ * @param [encoding='utf8'] The character encoding of `string`.
336
336
  * @return Number of bytes written.
337
337
  */
338
338
  write(string: string, encoding?: BufferEncoding): number;
@@ -370,9 +370,9 @@ declare module 'buffer' {
370
370
  * // Prints: té
371
371
  * ```
372
372
  * @since v0.1.90
373
- * @param encoding The character encoding to use.
374
- * @param start The byte offset to start decoding at.
375
- * @param end The byte offset to stop decoding at (not inclusive).
373
+ * @param [encoding='utf8'] The character encoding to use.
374
+ * @param [start=0] The byte offset to start decoding at.
375
+ * @param [end=buf.length] The byte offset to stop decoding at (not inclusive).
376
376
  */
377
377
  toString(encoding?: BufferEncoding, start?: number, end?: number): string;
378
378
  /**
@@ -466,10 +466,10 @@ declare module 'buffer' {
466
466
  * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
467
467
  * @since v0.11.13
468
468
  * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
469
- * @param targetStart The offset within `target` at which to begin comparison.
470
- * @param targetEnd The offset within `target` at which to end comparison (not inclusive).
471
- * @param sourceStart The offset within `buf` at which to begin comparison.
472
- * @param sourceEnd The offset within `buf` at which to end comparison (not inclusive).
469
+ * @param [targetStart=0] The offset within `target` at which to begin comparison.
470
+ * @param [targetEnd=target.length] The offset within `target` at which to end comparison (not inclusive).
471
+ * @param [sourceStart=0] The offset within `buf` at which to begin comparison.
472
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to end comparison (not inclusive).
473
473
  */
474
474
  compare(target: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
475
475
  /**
@@ -516,9 +516,9 @@ declare module 'buffer' {
516
516
  * ```
517
517
  * @since v0.1.90
518
518
  * @param target A `Buffer` or {@link Uint8Array} to copy into.
519
- * @param targetStart The offset within `target` at which to begin writing.
520
- * @param sourceStart The offset within `buf` from which to begin copying.
521
- * @param sourceEnd The offset within `buf` at which to stop copying (not inclusive).
519
+ * @param [targetStart=0] The offset within `target` at which to begin writing.
520
+ * @param [sourceStart=0] The offset within `buf` from which to begin copying.
521
+ * @param [sourceEnd=buf.length] The offset within `buf` at which to stop copying (not inclusive).
522
522
  * @return The number of bytes copied.
523
523
  */
524
524
  copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
@@ -543,8 +543,8 @@ declare module 'buffer' {
543
543
  * // Prints: buffer
544
544
  * ```
545
545
  * @since v0.3.0
546
- * @param start Where the new `Buffer` will start.
547
- * @param end Where the new `Buffer` will end (not inclusive).
546
+ * @param [start=0] Where the new `Buffer` will start.
547
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
548
548
  */
549
549
  slice(start?: number, end?: number): Buffer;
550
550
  /**
@@ -599,8 +599,8 @@ declare module 'buffer' {
599
599
  * // (Equivalent to buf.subarray(1, 4).)
600
600
  * ```
601
601
  * @since v3.0.0
602
- * @param start Where the new `Buffer` will start.
603
- * @param end Where the new `Buffer` will end (not inclusive).
602
+ * @param [start=0] Where the new `Buffer` will start.
603
+ * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
604
604
  */
605
605
  subarray(start?: number, end?: number): Buffer;
606
606
  /**
@@ -618,7 +618,7 @@ declare module 'buffer' {
618
618
  * ```
619
619
  * @since v12.0.0, v10.20.0
620
620
  * @param value Number to be written to `buf`.
621
- * @param offset Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
621
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
622
622
  * @return `offset` plus the number of bytes written.
623
623
  */
624
624
  writeBigInt64BE(value: bigint, offset?: number): number;
@@ -637,7 +637,7 @@ declare module 'buffer' {
637
637
  * ```
638
638
  * @since v12.0.0, v10.20.0
639
639
  * @param value Number to be written to `buf`.
640
- * @param offset Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
640
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
641
641
  * @return `offset` plus the number of bytes written.
642
642
  */
643
643
  writeBigInt64LE(value: bigint, offset?: number): number;
@@ -656,7 +656,7 @@ declare module 'buffer' {
656
656
  * ```
657
657
  * @since v12.0.0, v10.20.0
658
658
  * @param value Number to be written to `buf`.
659
- * @param offset Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
659
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
660
660
  * @return `offset` plus the number of bytes written.
661
661
  */
662
662
  writeBigUInt64BE(value: bigint, offset?: number): number;
@@ -675,7 +675,7 @@ declare module 'buffer' {
675
675
  * This function is also available under the `writeBigUint64LE` alias.
676
676
  * @since v12.0.0, v10.20.0
677
677
  * @param value Number to be written to `buf`.
678
- * @param offset Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
678
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy: `0 <= offset <= buf.length - 8`.
679
679
  * @return `offset` plus the number of bytes written.
680
680
  */
681
681
  writeBigUInt64LE(value: bigint, offset?: number): number;
@@ -771,7 +771,7 @@ declare module 'buffer' {
771
771
  * // Prints: 4294967295n
772
772
  * ```
773
773
  * @since v12.0.0, v10.20.0
774
- * @param offset Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
774
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
775
775
  */
776
776
  readBigUInt64BE(offset?: number): bigint;
777
777
  /**
@@ -786,7 +786,7 @@ declare module 'buffer' {
786
786
  * // Prints: 18446744069414584320n
787
787
  * ```
788
788
  * @since v12.0.0, v10.20.0
789
- * @param offset Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
789
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
790
790
  */
791
791
  readBigUInt64LE(offset?: number): bigint;
792
792
  /**
@@ -795,7 +795,7 @@ declare module 'buffer' {
795
795
  * Integers read from a `Buffer` are interpreted as two's complement signed
796
796
  * values.
797
797
  * @since v12.0.0, v10.20.0
798
- * @param offset Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
798
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
799
799
  */
800
800
  readBigInt64BE(offset?: number): bigint;
801
801
  /**
@@ -804,7 +804,7 @@ declare module 'buffer' {
804
804
  * Integers read from a `Buffer` are interpreted as two's complement signed
805
805
  * values.
806
806
  * @since v12.0.0, v10.20.0
807
- * @param offset Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
807
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy: `0 <= offset <= buf.length - 8`.
808
808
  */
809
809
  readBigInt64LE(offset?: number): bigint;
810
810
  /**
@@ -893,7 +893,7 @@ declare module 'buffer' {
893
893
  * // Throws ERR_OUT_OF_RANGE.
894
894
  * ```
895
895
  * @since v0.5.0
896
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
896
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
897
897
  */
898
898
  readUInt8(offset?: number): number;
899
899
  /**
@@ -912,7 +912,7 @@ declare module 'buffer' {
912
912
  * // Throws ERR_OUT_OF_RANGE.
913
913
  * ```
914
914
  * @since v0.5.5
915
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
915
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
916
916
  */
917
917
  readUInt16LE(offset?: number): number;
918
918
  /**
@@ -929,7 +929,7 @@ declare module 'buffer' {
929
929
  * // Prints: 3456
930
930
  * ```
931
931
  * @since v0.5.5
932
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
932
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
933
933
  */
934
934
  readUInt16BE(offset?: number): number;
935
935
  /**
@@ -946,7 +946,7 @@ declare module 'buffer' {
946
946
  * // Throws ERR_OUT_OF_RANGE.
947
947
  * ```
948
948
  * @since v0.5.5
949
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
949
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
950
950
  */
951
951
  readUInt32LE(offset?: number): number;
952
952
  /**
@@ -961,7 +961,7 @@ declare module 'buffer' {
961
961
  * // Prints: 12345678
962
962
  * ```
963
963
  * @since v0.5.5
964
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
964
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
965
965
  */
966
966
  readUInt32BE(offset?: number): number;
967
967
  /**
@@ -980,7 +980,7 @@ declare module 'buffer' {
980
980
  * // Throws ERR_OUT_OF_RANGE.
981
981
  * ```
982
982
  * @since v0.5.0
983
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
983
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.
984
984
  */
985
985
  readInt8(offset?: number): number;
986
986
  /**
@@ -997,7 +997,7 @@ declare module 'buffer' {
997
997
  * // Throws ERR_OUT_OF_RANGE.
998
998
  * ```
999
999
  * @since v0.5.5
1000
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
1000
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
1001
1001
  */
1002
1002
  readInt16LE(offset?: number): number;
1003
1003
  /**
@@ -1012,7 +1012,7 @@ declare module 'buffer' {
1012
1012
  * // Prints: 5
1013
1013
  * ```
1014
1014
  * @since v0.5.5
1015
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
1015
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.
1016
1016
  */
1017
1017
  readInt16BE(offset?: number): number;
1018
1018
  /**
@@ -1029,7 +1029,7 @@ declare module 'buffer' {
1029
1029
  * // Throws ERR_OUT_OF_RANGE.
1030
1030
  * ```
1031
1031
  * @since v0.5.5
1032
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1032
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1033
1033
  */
1034
1034
  readInt32LE(offset?: number): number;
1035
1035
  /**
@@ -1044,7 +1044,7 @@ declare module 'buffer' {
1044
1044
  * // Prints: 5
1045
1045
  * ```
1046
1046
  * @since v0.5.5
1047
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1047
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1048
1048
  */
1049
1049
  readInt32BE(offset?: number): number;
1050
1050
  /**
@@ -1059,7 +1059,7 @@ declare module 'buffer' {
1059
1059
  * // Throws ERR_OUT_OF_RANGE.
1060
1060
  * ```
1061
1061
  * @since v0.11.15
1062
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1062
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1063
1063
  */
1064
1064
  readFloatLE(offset?: number): number;
1065
1065
  /**
@@ -1072,7 +1072,7 @@ declare module 'buffer' {
1072
1072
  * // Prints: 2.387939260590663e-38
1073
1073
  * ```
1074
1074
  * @since v0.11.15
1075
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1075
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.
1076
1076
  */
1077
1077
  readFloatBE(offset?: number): number;
1078
1078
  /**
@@ -1087,7 +1087,7 @@ declare module 'buffer' {
1087
1087
  * // Throws ERR_OUT_OF_RANGE.
1088
1088
  * ```
1089
1089
  * @since v0.11.15
1090
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
1090
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
1091
1091
  */
1092
1092
  readDoubleLE(offset?: number): number;
1093
1093
  /**
@@ -1100,7 +1100,7 @@ declare module 'buffer' {
1100
1100
  * // Prints: 8.20788039913184e-304
1101
1101
  * ```
1102
1102
  * @since v0.11.15
1103
- * @param offset Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
1103
+ * @param [offset=0] Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.
1104
1104
  */
1105
1105
  readDoubleBE(offset?: number): number;
1106
1106
  reverse(): this;
@@ -1204,7 +1204,7 @@ declare module 'buffer' {
1204
1204
  * ```
1205
1205
  * @since v0.5.0
1206
1206
  * @param value Number to be written to `buf`.
1207
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
1207
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
1208
1208
  * @return `offset` plus the number of bytes written.
1209
1209
  */
1210
1210
  writeUInt8(value: number, offset?: number): number;
@@ -1225,7 +1225,7 @@ declare module 'buffer' {
1225
1225
  * ```
1226
1226
  * @since v0.5.5
1227
1227
  * @param value Number to be written to `buf`.
1228
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1228
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1229
1229
  * @return `offset` plus the number of bytes written.
1230
1230
  */
1231
1231
  writeUInt16LE(value: number, offset?: number): number;
@@ -1246,7 +1246,7 @@ declare module 'buffer' {
1246
1246
  * ```
1247
1247
  * @since v0.5.5
1248
1248
  * @param value Number to be written to `buf`.
1249
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1249
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1250
1250
  * @return `offset` plus the number of bytes written.
1251
1251
  */
1252
1252
  writeUInt16BE(value: number, offset?: number): number;
@@ -1266,7 +1266,7 @@ declare module 'buffer' {
1266
1266
  * ```
1267
1267
  * @since v0.5.5
1268
1268
  * @param value Number to be written to `buf`.
1269
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1269
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1270
1270
  * @return `offset` plus the number of bytes written.
1271
1271
  */
1272
1272
  writeUInt32LE(value: number, offset?: number): number;
@@ -1286,7 +1286,7 @@ declare module 'buffer' {
1286
1286
  * ```
1287
1287
  * @since v0.5.5
1288
1288
  * @param value Number to be written to `buf`.
1289
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1289
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1290
1290
  * @return `offset` plus the number of bytes written.
1291
1291
  */
1292
1292
  writeUInt32BE(value: number, offset?: number): number;
@@ -1308,7 +1308,7 @@ declare module 'buffer' {
1308
1308
  * ```
1309
1309
  * @since v0.5.0
1310
1310
  * @param value Number to be written to `buf`.
1311
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
1311
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.
1312
1312
  * @return `offset` plus the number of bytes written.
1313
1313
  */
1314
1314
  writeInt8(value: number, offset?: number): number;
@@ -1328,7 +1328,7 @@ declare module 'buffer' {
1328
1328
  * ```
1329
1329
  * @since v0.5.5
1330
1330
  * @param value Number to be written to `buf`.
1331
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1331
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1332
1332
  * @return `offset` plus the number of bytes written.
1333
1333
  */
1334
1334
  writeInt16LE(value: number, offset?: number): number;
@@ -1348,7 +1348,7 @@ declare module 'buffer' {
1348
1348
  * ```
1349
1349
  * @since v0.5.5
1350
1350
  * @param value Number to be written to `buf`.
1351
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1351
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.
1352
1352
  * @return `offset` plus the number of bytes written.
1353
1353
  */
1354
1354
  writeInt16BE(value: number, offset?: number): number;
@@ -1368,7 +1368,7 @@ declare module 'buffer' {
1368
1368
  * ```
1369
1369
  * @since v0.5.5
1370
1370
  * @param value Number to be written to `buf`.
1371
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1371
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1372
1372
  * @return `offset` plus the number of bytes written.
1373
1373
  */
1374
1374
  writeInt32LE(value: number, offset?: number): number;
@@ -1388,7 +1388,7 @@ declare module 'buffer' {
1388
1388
  * ```
1389
1389
  * @since v0.5.5
1390
1390
  * @param value Number to be written to `buf`.
1391
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1391
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1392
1392
  * @return `offset` plus the number of bytes written.
1393
1393
  */
1394
1394
  writeInt32BE(value: number, offset?: number): number;
@@ -1406,7 +1406,7 @@ declare module 'buffer' {
1406
1406
  * ```
1407
1407
  * @since v0.11.15
1408
1408
  * @param value Number to be written to `buf`.
1409
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1409
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1410
1410
  * @return `offset` plus the number of bytes written.
1411
1411
  */
1412
1412
  writeFloatLE(value: number, offset?: number): number;
@@ -1424,7 +1424,7 @@ declare module 'buffer' {
1424
1424
  * ```
1425
1425
  * @since v0.11.15
1426
1426
  * @param value Number to be written to `buf`.
1427
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1427
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.
1428
1428
  * @return `offset` plus the number of bytes written.
1429
1429
  */
1430
1430
  writeFloatBE(value: number, offset?: number): number;
@@ -1442,7 +1442,7 @@ declare module 'buffer' {
1442
1442
  * ```
1443
1443
  * @since v0.11.15
1444
1444
  * @param value Number to be written to `buf`.
1445
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
1445
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
1446
1446
  * @return `offset` plus the number of bytes written.
1447
1447
  */
1448
1448
  writeDoubleLE(value: number, offset?: number): number;
@@ -1460,7 +1460,7 @@ declare module 'buffer' {
1460
1460
  * ```
1461
1461
  * @since v0.11.15
1462
1462
  * @param value Number to be written to `buf`.
1463
- * @param offset Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
1463
+ * @param [offset=0] Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.
1464
1464
  * @return `offset` plus the number of bytes written.
1465
1465
  */
1466
1466
  writeDoubleBE(value: number, offset?: number): number;
@@ -1506,9 +1506,9 @@ declare module 'buffer' {
1506
1506
  * ```
1507
1507
  * @since v0.5.0
1508
1508
  * @param value The value with which to fill `buf`.
1509
- * @param offset Number of bytes to skip before starting to fill `buf`.
1510
- * @param end Where to stop filling `buf` (not inclusive).
1511
- * @param encoding The encoding for `value` if `value` is a string.
1509
+ * @param [offset=0] Number of bytes to skip before starting to fill `buf`.
1510
+ * @param [end=buf.length] Where to stop filling `buf` (not inclusive).
1511
+ * @param [encoding='utf8'] The encoding for `value` if `value` is a string.
1512
1512
  * @return A reference to `buf`.
1513
1513
  */
1514
1514
  fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
@@ -1572,8 +1572,8 @@ declare module 'buffer' {
1572
1572
  * than `buf.length`, `byteOffset` will be returned. If `value` is empty and`byteOffset` is at least `buf.length`, `buf.length` will be returned.
1573
1573
  * @since v1.5.0
1574
1574
  * @param value What to search for.
1575
- * @param byteOffset Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
1576
- * @param encoding If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
1575
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
1576
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
1577
1577
  * @return The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
1578
1578
  */
1579
1579
  indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
@@ -1636,8 +1636,8 @@ declare module 'buffer' {
1636
1636
  * If `value` is an empty string or empty `Buffer`, `byteOffset` will be returned.
1637
1637
  * @since v6.0.0
1638
1638
  * @param value What to search for.
1639
- * @param byteOffset Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
1640
- * @param encoding If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
1639
+ * @param [byteOffset=buf.length - 1] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
1640
+ * @param [encoding='utf8'] If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.
1641
1641
  * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
1642
1642
  */
1643
1643
  lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
@@ -1687,8 +1687,8 @@ declare module 'buffer' {
1687
1687
  * ```
1688
1688
  * @since v5.3.0
1689
1689
  * @param value What to search for.
1690
- * @param byteOffset Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
1691
- * @param encoding If `value` is a string, this is its encoding.
1690
+ * @param [byteOffset=0] Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.
1691
+ * @param [encoding='utf8'] If `value` is a string, this is its encoding.
1692
1692
  * @return `true` if `value` was found in `buf`, `false` otherwise.
1693
1693
  */
1694
1694
  includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
node/cluster.d.ts CHANGED
@@ -137,7 +137,7 @@ declare module 'cluster' {
137
137
  * In a worker, `process.kill()` exists, but it is not this function;
138
138
  * it is `kill()`.
139
139
  * @since v0.9.12
140
- * @param signal Name of the kill signal to send to the worker process.
140
+ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.
141
141
  */
142
142
  kill(signal?: string): void;
143
143
  destroy(signal?: string): void;
node/crypto.d.ts CHANGED
@@ -1133,6 +1133,7 @@ declare module 'crypto' {
1133
1133
  *
1134
1134
  * The `cipher.setAutoPadding()` method must be called before `cipher.final()`.
1135
1135
  * @since v0.7.1
1136
+ * @param [autoPadding=true]
1136
1137
  * @return for method chaining.
1137
1138
  */
1138
1139
  setAutoPadding(autoPadding?: boolean): this;
@@ -1441,6 +1442,7 @@ declare module 'crypto' {
1441
1442
  *
1442
1443
  * The `decipher.setAutoPadding()` method must be called before `decipher.final()`.
1443
1444
  * @since v0.7.1
1445
+ * @param [autoPadding=true]
1444
1446
  * @return for method chaining.
1445
1447
  */
1446
1448
  setAutoPadding(auto_padding?: boolean): this;
@@ -1790,6 +1792,7 @@ declare module 'crypto' {
1790
1792
  * otherwise a number, `Buffer`, `TypedArray`, or `DataView` is expected.
1791
1793
  * @since v0.11.12
1792
1794
  * @param primeEncoding The `encoding` of the `prime` string.
1795
+ * @param [generator=2]
1793
1796
  * @param generatorEncoding The `encoding` of the `generator` string.
1794
1797
  */
1795
1798
  function createDiffieHellman(primeLength: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
@@ -2279,7 +2282,7 @@ declare module 'crypto' {
2279
2282
  * console.log(`The dice rolled: ${n}`);
2280
2283
  * ```
2281
2284
  * @since v14.10.0, v12.19.0
2282
- * @param min Start of random range (inclusive).
2285
+ * @param [min=0] Start of random range (inclusive).
2283
2286
  * @param max End of random range (exclusive).
2284
2287
  * @param callback `function(err, n) {}`.
2285
2288
  */
@@ -2359,6 +2362,8 @@ declare module 'crypto' {
2359
2362
  * ```
2360
2363
  * @since v7.10.0, v6.13.0
2361
2364
  * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
2365
+ * @param [offset=0]
2366
+ * @param [size=buffer.length - offset]
2362
2367
  * @return The object passed as `buffer` argument.
2363
2368
  */
2364
2369
  function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
@@ -2484,6 +2489,8 @@ declare module 'crypto' {
2484
2489
  * request.
2485
2490
  * @since v7.10.0, v6.13.0
2486
2491
  * @param buffer Must be supplied. The size of the provided `buffer` must not be larger than `2**31 - 1`.
2492
+ * @param [offset=0]
2493
+ * @param [size=buffer.length - offset]
2487
2494
  * @param callback `function(err, buf) {}`.
2488
2495
  */
2489
2496
  function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
@@ -2832,6 +2839,7 @@ declare module 'crypto' {
2832
2839
  * @since v10.0.0
2833
2840
  * @param inputEncoding The `encoding` of the `key` string.
2834
2841
  * @param outputEncoding The `encoding` of the return value.
2842
+ * @param [format='uncompressed']
2835
2843
  */
2836
2844
  static convertKey(
2837
2845
  key: BinaryLike,
@@ -2850,6 +2858,7 @@ declare module 'crypto' {
2850
2858
  * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
2851
2859
  * @since v0.11.14
2852
2860
  * @param encoding The `encoding` of the return value.
2861
+ * @param [format='uncompressed']
2853
2862
  */
2854
2863
  generateKeys(): Buffer;
2855
2864
  generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
@@ -2890,6 +2899,7 @@ declare module 'crypto' {
2890
2899
  * returned.
2891
2900
  * @since v0.11.14
2892
2901
  * @param encoding The `encoding` of the return value.
2902
+ * @param [format='uncompressed']
2893
2903
  * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
2894
2904
  */
2895
2905
  getPublicKey(): Buffer;
node/dns/promises.d.ts CHANGED
@@ -122,7 +122,7 @@ declare module 'dns/promises' {
122
122
  * On error, the `Promise` is rejected with an `Error` object, where `err.code`is one of the `DNS error codes`.
123
123
  * @since v10.6.0
124
124
  * @param hostname Host name to resolve.
125
- * @param rrtype Resource record type.
125
+ * @param [rrtype='A'] Resource record type.
126
126
  */
127
127
  function resolve(hostname: string): Promise<string[]>;
128
128
  function resolve(hostname: string, rrtype: 'A'): Promise<string[]>;
node/dns.d.ts CHANGED
@@ -244,7 +244,7 @@ declare module 'dns' {
244
244
  * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
245
245
  * @since v0.1.27
246
246
  * @param hostname Host name to resolve.
247
- * @param rrtype Resource record type.
247
+ * @param [rrtype='A'] Resource record type.
248
248
  */
249
249
  export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
250
250
  export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
@@ -626,8 +626,8 @@ declare module 'dns' {
626
626
  * servers, and the v6 local address when making requests to IPv6 DNS servers.
627
627
  * The `rrtype` of resolution requests has no impact on the local address used.
628
628
  * @since v15.1.0
629
- * @param ipv4 A string representation of an IPv4 address.
630
- * @param ipv6 A string representation of an IPv6 address.
629
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
630
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
631
631
  */
632
632
  setLocalAddress(ipv4?: string, ipv6?: string): void;
633
633
  setServers: typeof setServers;