@@ -36,17 +36,17 @@ interface InProgressImportResult extends ImportResult {
3636}
3737
3838type ChunkerType = 'fixed' | 'rabin'
39- type ProgressHandler = ( chunkSize : number , path ?: string ) => void
40- type HamtHashFn = ( value : Uint8Array ) => Promise < Uint8Array >
41- type Chunker = ( source : AsyncIterable < Uint8Array > , options : ImporterOptions ) => AsyncIterable < Uint8Array >
42- type DAGBuilder = ( source : AsyncIterable < ImportCandidate > | Iterable < ImportCandidate > , blockstore : Blockstore , options : ImporterOptions ) => AsyncIterable < ( ) => Promise < InProgressImportResult > >
43- type TreeBuilder = ( source : AsyncIterable < InProgressImportResult > , blockstore : Blockstore , options : ImporterOptions ) => AsyncIterable < ImportResult >
44- type BufferImporter = ( file : File , blockstore : Blockstore , options : ImporterOptions ) => AsyncIterable < ( ) => Promise < InProgressImportResult > >
45- type ChunkValidator = ( source : AsyncIterable < Uint8Array > , options : ImporterOptions ) => AsyncIterable < Uint8Array >
46- type UnixFSV1DagBuilder < T > = ( item : T , blockstore : Blockstore , options : ImporterOptions ) => Promise < InProgressImportResult >
47- type Reducer = ( leaves : InProgressImportResult [ ] ) => Promise < InProgressImportResult >
39+ interface ProgressHandler { ( chunkSize : number , path ?: string ) : void }
40+ interface HamtHashFn { ( value : Uint8Array ) : Promise < Uint8Array > }
41+ interface Chunker { ( source : AsyncIterable < Uint8Array > , options : ImporterOptions ) : AsyncIterable < Uint8Array > }
42+ interface DAGBuilder { ( source : AsyncIterable < ImportCandidate > | Iterable < ImportCandidate > , blockstore : Blockstore , options : ImporterOptions ) : AsyncIterable < ( ) => Promise < InProgressImportResult > > }
43+ interface TreeBuilder { ( source : AsyncIterable < InProgressImportResult > , blockstore : Blockstore , options : ImporterOptions ) : AsyncIterable < ImportResult > }
44+ interface BufferImporter { ( file : File , blockstore : Blockstore , options : ImporterOptions ) : AsyncIterable < ( ) => Promise < InProgressImportResult > > }
45+ interface ChunkValidator { ( source : AsyncIterable < Uint8Array > , options : ImporterOptions ) : AsyncIterable < Uint8Array > }
46+ interface UnixFSV1DagBuilder < T > { ( item : T , blockstore : Blockstore , options : ImporterOptions ) : Promise < InProgressImportResult > }
47+ interface Reducer { ( leaves : InProgressImportResult [ ] ) : Promise < InProgressImportResult > }
4848
49- type FileDAGBuilder = ( source : AsyncIterable < InProgressImportResult > | Iterable < InProgressImportResult > , reducer : Reducer , options : ImporterOptions ) => Promise < InProgressImportResult >
49+ interface FileDAGBuilder { ( source : AsyncIterable < InProgressImportResult > | Iterable < InProgressImportResult > , reducer : Reducer , options : ImporterOptions ) : Promise < InProgressImportResult > }
5050
5151interface UserImporterOptions {
5252 strategy ?: 'balanced' | 'flat' | 'trickle'
@@ -115,14 +115,14 @@ interface ImporterOptions {
115115}
116116
117117export interface TrickleDagNode {
118- children : InProgressImportResult [ ] ,
119- depth : number ,
120- maxDepth : number ,
121- maxChildren : number ,
122- data ?: InProgressImportResult [ ] ,
118+ children : InProgressImportResult [ ]
119+ depth : number
120+ maxDepth : number
121+ maxChildren : number
122+ data ?: InProgressImportResult [ ]
123123 parent ?: TrickleDagNode
124- cid ?: CID ,
125- size ?: number ,
124+ cid ?: CID
125+ size ?: number
126126 unixfs ?: UnixFS
127127}
128128
0 commit comments