Skip to content

Commit

Permalink
fix(api): fix typings for 'Buffer'
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Dec 11, 2024
1 parent 35ce16e commit 4eecb05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
}
}

Buffer.concat = function concat (list, length) {
Buffer.concat = function concat (list, length = undefined) {
if (!Array.isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
Expand Down
2 changes: 1 addition & 1 deletion api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ declare module "socket:buffer" {
export function isBuffer(b: any): boolean;
export function compare(a: any, b: any): 0 | 1 | -1;
export function isEncoding(encoding: any): boolean;
export function concat(list: any, length: any): Uint8Array;
export function concat(list: any, length?: any): Uint8Array;
export { byteLength };
}
export const kMaxLength: 2147483647;
Expand Down

0 comments on commit 4eecb05

Please sign in to comment.