Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
Make unpadBuffer param type "Buffer"
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke committed Apr 27, 2020
1 parent a2a50ae commit 1f2803c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const setLength = function(msg: Buffer, length: number, right: boolean) {
* @param a (Buffer)
* @return (Buffer)
*/
export const unpadBuffer = function(a: any): Buffer {
export const unpadBuffer = function(a: Buffer): Buffer {
assertIsBuffer(a)
return stripZeros(a) as Buffer
}
Expand Down
2 changes: 1 addition & 1 deletion test/bytes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('unpadBuffer', function() {
})
it('should throw if input is not a Buffer', function() {
assert.throws(function() {
unpadBuffer('0000000006600')
unpadBuffer((<unknown>'0000000006600') as Buffer)
})
})
})
Expand Down

0 comments on commit 1f2803c

Please sign in to comment.