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'); }