@@ -369,16 +369,20 @@ added: v10.0.0
369369
370370<!-- YAML
371371added: v10.0.0
372+ changes:
373+ - version: REPLACEME
374+ pr-url: https://github.com/nodejs/node/pull/42835
375+ description: Accepts bigint values as ` position` .
372376-->
373377
374378* ` buffer` {Buffer|TypedArray|DataView} A buffer that will be filled with the
375379 file data read.
376380* ` offset` {integer} The location in the buffer at which to start filling.
377381* ` length` {integer} The number of bytes to read.
378- * ` position` {integer|null} The location where to begin reading data from the
379- file. If ` null ` , data will be read from the current file position, and
380- the position will be updated. If ` position` is an integer, the current
381- file position will remain unchanged.
382+ * ` position` {integer|bigint| null} The location where to begin reading data
383+ from the file. If ` null ` or ` - 1 ` , data will be read from the current file
384+ position, and the position will be updated. If ` position` is a non-negative
385+ integer, the current file position will remain unchanged.
382386* Returns: {Promise} Fulfills upon success with an object with two properties:
383387 * ` bytesRead` {integer} The number of bytes read
384388 * ` buffer` {Buffer|TypedArray|DataView} A reference to the passed in ` buffer`
@@ -395,6 +399,10 @@ number of bytes read is zero.
395399added:
396400 - v13.11.0
397401 - v12.17.0
402+ changes:
403+ - version: REPLACEME
404+ pr-url: https://github.com/nodejs/node/pull/42835
405+ description: Accepts bigint values as ` position` .
398406-->
399407
400408* ` options` {Object}
@@ -404,10 +412,11 @@ added:
404412 **Default:** ` 0 `
405413 * ` length` {integer} The number of bytes to read. **Default:**
406414 ` buffer .byteLength - offset`
407- * ` position` {integer|null} The location where to begin reading data from the
408- file. If ` null ` , data will be read from the current file position, and
409- the position will be updated. If ` position` is an integer, the current
410- file position will remain unchanged. **Default:**: ` null `
415+ * ` position` {integer|bigint|null} The location where to begin reading data
416+ from the file. If ` null ` or ` - 1 ` , data will be read from the current file
417+ position, and the position will be updated. If ` position` is a non-negative
418+ integer, the current file position will remain unchanged.
419+ **Default:**: ` null `
411420* Returns: {Promise} Fulfills upon success with an object with two properties:
412421 * ` bytesRead` {integer} The number of bytes read
413422 * ` buffer` {Buffer|TypedArray|DataView} A reference to the passed in ` buffer`
@@ -424,6 +433,10 @@ number of bytes read is zero.
424433added:
425434 - v18.2.0
426435 - v16.17.0
436+ changes:
437+ - version: REPLACEME
438+ pr-url: https://github.com/nodejs/node/pull/42835
439+ description: Accepts bigint values as ` position` .
427440-->
428441
429442* ` buffer` {Buffer|TypedArray|DataView} A buffer that will be filled with the
@@ -433,10 +446,11 @@ added:
433446 **Default:** ` 0 `
434447 * ` length` {integer} The number of bytes to read. **Default:**
435448 ` buffer .byteLength - offset`
436- * ` position` {integer} The location where to begin reading data from the
437- file. If ` null ` , data will be read from the current file position, and
438- the position will be updated. If ` position` is an integer, the current
439- file position will remain unchanged. **Default:**: ` null `
449+ * ` position` {integer|bigint|null} The location where to begin reading data
450+ from the file. If ` null ` or ` - 1 ` , data will be read from the current file
451+ position, and the position will be updated. If ` position` is a non-negative
452+ integer, the current file position will remain unchanged.
453+ **Default:**: ` null `
440454* Returns: {Promise} Fulfills upon success with an object with two properties:
441455 * ` bytesRead` {integer} The number of bytes read
442456 * ` buffer` {Buffer|TypedArray|DataView} A reference to the passed in ` buffer`
@@ -3514,8 +3528,8 @@ changes:
35143528* ` length` {integer} The number of bytes to read.
35153529* ` position` {integer|bigint|null} Specifies where to begin reading from in the
35163530 file. If ` position` is ` null ` or ` - 1 ` , data will be read from the current
3517- file position, and the file position will be updated. If ` position` is an
3518- integer, the file position will be unchanged.
3531+ file position, and the file position will be updated. If ` position` is
3532+ a non-negative integer, the file position will be unchanged.
35193533* ` callback` {Function}
35203534 * ` err` {Error}
35213535 * ` bytesRead` {integer}
0 commit comments