Skip to content

Commit a694dbe

Browse files
committed
format and fix
1 parent 6b8fc06 commit a694dbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codec/binary.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Packr } from 'msgpackr';
1+
import { Options, Packr } from 'msgpackr';
22
import { Codec } from './types';
33

44
const packr = new Packr({
@@ -8,7 +8,7 @@ const packr = new Packr({
88
useTimestamp32: false,
99
useBigIntExtension: true,
1010
skipValues: [undefined],
11-
});
11+
} as Options);
1212

1313
/**
1414
* Binary codec, uses [msgpackr](https://www.npmjs.com/package/msgpackr) under the hood
@@ -19,7 +19,7 @@ export const BinaryCodec: Codec = {
1919
return packr.pack(obj);
2020
},
2121
fromBuffer: (buff: Uint8Array) => {
22-
const res = packr.unpack(buff);
22+
const res: unknown = packr.unpack(buff);
2323
if (typeof res !== 'object' || res === null) {
2424
throw new Error('unpacked msg is not an object');
2525
}

0 commit comments

Comments
 (0)