@@ -266,6 +266,7 @@ function _copyActual(source, target, targetStart, sourceStart, sourceEnd) {
266266 * runtime deprecation would introduce too much breakage at this time. It's not
267267 * likely that the Buffer constructors would ever actually be removed.
268268 * Deprecation Code: DEP0005
269+ * @returns {Buffer }
269270 */
270271function Buffer ( arg , encodingOrOffset , length ) {
271272 showFlaggedDeprecation ( ) ;
@@ -293,6 +294,10 @@ ObjectDefineProperty(Buffer, SymbolSpecies, {
293294 * Buffer.from(array)
294295 * Buffer.from(buffer)
295296 * Buffer.from(arrayBuffer[, byteOffset[, length]])
297+ * @param {any } value
298+ * @param {BufferEncoding|number } encodingOrOffset
299+ * @param {number } [length]
300+ * @returns {Buffer }
296301 */
297302Buffer . from = function from ( value , encodingOrOffset , length ) {
298303 if ( typeof value === 'string' )
@@ -389,6 +394,7 @@ ObjectSetPrototypeOf(Buffer, Uint8Array);
389394/**
390395 * Creates a new filled Buffer instance.
391396 * alloc(size[, fill[, encoding]])
397+ * @returns {FastBuffer }
392398 */
393399Buffer . alloc = function alloc ( size , fill , encoding ) {
394400 validateNumber ( size , 'size' , 0 , kMaxLength ) ;
@@ -402,6 +408,7 @@ Buffer.alloc = function alloc(size, fill, encoding) {
402408/**
403409 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer
404410 * instance. If `--zero-fill-buffers` is set, will zero-fill the buffer.
411+ * @returns {FastBuffer }
405412 */
406413Buffer . allocUnsafe = function allocUnsafe ( size ) {
407414 validateNumber ( size , 'size' , 0 , kMaxLength ) ;
@@ -412,6 +419,8 @@ Buffer.allocUnsafe = function allocUnsafe(size) {
412419 * By default creates a non-zero-filled Buffer instance that is not allocated
413420 * off the pre-initialized pool. If `--zero-fill-buffers` is set, will zero-fill
414421 * the buffer.
422+ * @param {number } size
423+ * @returns {FastBuffer|undefined }
415424 */
416425Buffer . allocUnsafeSlow = function allocUnsafeSlow ( size ) {
417426 validateNumber ( size , 'size' , 0 , kMaxLength ) ;
0 commit comments