UNPKG

cborkit

Version:

A modern, extensible CBOR (Concise Binary Object Representation) library for TypeScript and JavaScript.

15 lines (12 loc) 501 B
import { c as CborItem, b as CborType } from './types-UHBEKmQx.js'; type DecoderFn<T extends CborItem = CborItem> = (value: T, next: () => unknown, decode: (item: CborItem) => unknown) => unknown; type Decoder = { [Key in CborType]?: DecoderFn<Extract<CborItem, { type: Key; }>>; }; type DecodeOptions = { decoders?: Decoder[]; }; declare const decode: (bytes: Uint8Array, options?: DecodeOptions) => unknown; export { type DecodeOptions, type Decoder, type DecoderFn, decode };