From eeccc5757b7fee640db24d56c9d885a709954f86 Mon Sep 17 00:00:00 2001 From: James P Date: Fri, 3 May 2024 08:38:51 -0500 Subject: [PATCH] Fixed deserialize buffer type --- src/struct.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/struct.ts b/src/struct.ts index c4bf646..dc5cd4d 100644 --- a/src/struct.ts +++ b/src/struct.ts @@ -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'); }