@ipld/dag-cbor
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -8,2 +8,7 @@ import * as cborg from 'cborg' | ||
/** | ||
* @template T | ||
* @typedef {import('multiformats/codecs/interface').ByteView<T>} ByteView | ||
*/ | ||
/** | ||
* cidEncoder will receive all Objects during encode, it needs to filter out | ||
@@ -102,3 +107,3 @@ * anything that's not a CID and return `null` for that so it's encoded as | ||
* @param {T} node | ||
* @returns {Uint8Array} | ||
* @returns {ByteView<T>} | ||
*/ | ||
@@ -109,5 +114,5 @@ export const encode = (node) => cborg.encode(node, encodeOptions) | ||
* @template T | ||
* @param {Uint8Array} data | ||
* @param {ByteView<T>} data | ||
* @returns {T} | ||
*/ | ||
export const decode = (data) => cborg.decode(data, decodeOptions) |
{ | ||
"name": "@ipld/dag-cbor", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"description": "JS implementation of DAG-CBOR", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
export const name: "dag-cbor"; | ||
export const code: 113; | ||
export function encode<T>(node: T): Uint8Array; | ||
export function decode<T>(data: Uint8Array): T; | ||
export function encode<T>(node: T): ByteView<T>; | ||
export function decode<T>(data: ByteView<T>): T; | ||
export type ByteView<T> = import('multiformats/codecs/interface').ByteView<T>; | ||
//# sourceMappingURL=index.d.ts.map |
Sorry, the diff of this file is not supported yet
45087
1252