@@ -8,6 +8,7 @@ const last = require('it-last')
88/**
99 * @typedef {import('ipfs-unixfs') } UnixFS
1010 * @typedef {import('ipld-dag-pb').DAGNode } DAGNode
11+ * @typedef {import('ipfs-core-types/src/ipld').IPLD } IPLD
1112 *
1213 * @typedef {object } UnixFSFile
1314 * @property {'file' } type
@@ -35,7 +36,8 @@ const last = require('it-last')
3536 * @property {string } path
3637 * @property {CID } cid
3738 * @property {number } depth
38- * @property {any } node
39+ * @property {Uint8Array } node
40+ * @property {(options?: ExporterOptions) => AsyncIterable<any> } content
3941 *
4042 * @typedef {object } RawNode
4143 * @property {'raw' } type
@@ -59,13 +61,11 @@ const last = require('it-last')
5961 */
6062
6163/**
62- * @typedef {object } IPLDResolver
63- * @property {(cid: CID, options?: any) => Promise<any> } get
64- * @property {(node: any, codec: number, options?: any) => Promise<CID> } put
65- *
6664 * @typedef {object } ExporterOptions
6765 * @property {number } [offset=0]
6866 * @property {number } [length]
67+ * @property {AbortSignal } [signal]
68+ * @property {number } [timeout]
6969 */
7070
7171const toPathComponents = ( path = '' ) => {
@@ -112,7 +112,7 @@ const cidAndRest = (path) => {
112112
113113/**
114114 * @param {string | CID } path
115- * @param {IPLDResolver } ipld
115+ * @param {IPLD } ipld
116116 * @param {ExporterOptions } [options]
117117 */
118118const walkPath = async function * ( path , ipld , options = { } ) {
@@ -149,7 +149,7 @@ const walkPath = async function * (path, ipld, options = {}) {
149149
150150/**
151151 * @param {string | CID } path
152- * @param {IPLDResolver } ipld
152+ * @param {IPLD } ipld
153153 * @param {ExporterOptions } [options]
154154 */
155155const exporter = async ( path , ipld , options = { } ) => {
@@ -164,7 +164,7 @@ const exporter = async (path, ipld, options = {}) => {
164164
165165/**
166166 * @param {string | CID } path
167- * @param {IPLDResolver } ipld
167+ * @param {IPLD } ipld
168168 * @param {ExporterOptions } [options]
169169 */
170170const recursive = async function * ( path , ipld , options = { } ) {
0 commit comments