Skip to content

Commit 7a7e7c5

Browse files
authored
Merge pull request #43 from salortiz/patch-1
Add `read` and `write` methods to `Extension`
2 parents 6846416 + fdeb907 commit 7a7e7c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unpack.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ export interface Options {
2525
interface Extension {
2626
Class: Function
2727
type: number
28-
pack(value: any): Buffer | Uint8Array
29-
unpack(messagePack: Buffer | Uint8Array): any
28+
pack?(value: any): Buffer | Uint8Array
29+
unpack?(messagePack: Buffer | Uint8Array): any
30+
read?(datum: any): any
31+
write?(instance: any): any
3032
}
3133
export class Unpackr {
3234
constructor(options?: Options)

0 commit comments

Comments
 (0)