From e46e7fee4d148b7a7ce904b4a82b02485fbbce9c Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 24 Jul 2024 11:11:21 +1000 Subject: [PATCH] Revert "feat: BlockCodec methods are generic" This reverts commit 2ee062ee83115b28b8f1c153918cd61db5919e5c. --- src/codecs/interface.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/codecs/interface.ts b/src/codecs/interface.ts index 5e3ce278..8e5d9d1a 100644 --- a/src/codecs/interface.ts +++ b/src/codecs/interface.ts @@ -3,23 +3,23 @@ import type { ArrayBufferView, ByteView } from '../block/interface.js' /** * IPLD encoder part of the codec. */ -export interface BlockEncoder { +export interface BlockEncoder { name: string code: Code - encode(data: T): ByteView + encode(data: T): ByteView } /** * IPLD decoder part of the codec. */ -export interface BlockDecoder { +export interface BlockDecoder { code: Code - decode(bytes: ByteView | ArrayBufferView): T + decode(bytes: ByteView | ArrayBufferView): T } /** * An IPLD codec is a combination of both encoder and decoder. */ -export interface BlockCodec extends BlockEncoder, BlockDecoder {} +export interface BlockCodec extends BlockEncoder, BlockDecoder {} export type { ArrayBufferView, ByteView }