Skip to content

Commit 4eecb05

Browse files
committed
fix(api): fix typings for 'Buffer'
1 parent 35ce16e commit 4eecb05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

api/buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
662662
}
663663
}
664664

665-
Buffer.concat = function concat (list, length) {
665+
Buffer.concat = function concat (list, length = undefined) {
666666
if (!Array.isArray(list)) {
667667
throw new TypeError('"list" argument must be an Array of Buffers')
668668
}

api/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ declare module "socket:buffer" {
589589
export function isBuffer(b: any): boolean;
590590
export function compare(a: any, b: any): 0 | 1 | -1;
591591
export function isEncoding(encoding: any): boolean;
592-
export function concat(list: any, length: any): Uint8Array;
592+
export function concat(list: any, length?: any): Uint8Array;
593593
export { byteLength };
594594
}
595595
export const kMaxLength: 2147483647;

0 commit comments

Comments
 (0)