Skip to content

Commit

Permalink
Fix TypeScript type for the .buffer() method (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Apr 15, 2021
1 parent 831366e commit 0ee784a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ declare const getStream: {
*/
buffer(
stream: Stream,
options?: getStream.OptionsWithEncoding
options?: getStream.Options
): Promise<Buffer>;

/**
Expand Down
1 change: 0 additions & 1 deletion index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ expectType<Promise<string>>(getStream(stream, {encoding: 'utf8'}));

expectType<Promise<Buffer>>(getStream.buffer(stream));
expectType<Promise<Buffer>>(getStream.buffer(stream, {maxBuffer: 10}));
expectType<Promise<Buffer>>(getStream.buffer(stream, {encoding: 'utf8'}));

expectType<Promise<unknown[]>>(getStream.array(stream));
expectType<Promise<{}[]>>(getStream.array<{}>(stream));
Expand Down

0 comments on commit 0ee784a

Please sign in to comment.