Skip to content

Commit

Permalink
Fixed deserialize buffer type
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed May 3, 2024
1 parent 14b88d8 commit eeccc57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/struct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export function serialize(instance: unknown): Uint8Array {
/**
* Deserializes a struct from a Uint8Array
*/
export function deserialize(instance: unknown, _buffer: Uint8Array) {
export function deserialize(instance: unknown, _buffer: ArrayBuffer | ArrayBufferView) {
if (!isInstance(instance)) {
throw new TypeError('Can not deserialize, not a struct instance');
}
Expand Down

0 comments on commit eeccc57

Please sign in to comment.