We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 541b214 commit 2fff28dCopy full SHA for 2fff28d
codec/binary.ts
@@ -1,4 +1,4 @@
1
-import { Packr } from 'msgpackr';
+import { Options, Packr } from 'msgpackr';
2
import { Codec } from './types';
3
4
const packr = new Packr({
@@ -8,7 +8,7 @@ const packr = new Packr({
8
useTimestamp32: false,
9
useBigIntExtension: true,
10
skipValues: [undefined],
11
-});
+} as Options);
12
13
/**
14
* Binary codec, uses [msgpackr](https://www.npmjs.com/package/msgpackr) under the hood
@@ -19,7 +19,7 @@ export const BinaryCodec: Codec = {
19
return packr.pack(obj);
20
},
21
fromBuffer: (buff: Uint8Array) => {
22
- const res = packr.unpack(buff);
+ const res: unknown = packr.unpack(buff);
23
if (typeof res !== 'object' || res === null) {
24
throw new Error('unpacked msg is not an object');
25
}
0 commit comments