This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bitswap related typedefs (#3580)
Fixes up types so they align here ipfs/js-ipfs-bitswap#261 Co-authored-by: achingbrain <alex@achingbrain.net>
- Loading branch information
1 parent
49f7880
commit 1af82d1
Showing
5 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { AbortOptions, Await, AwaitIterable } from './basic' | ||
import type { Block } from './block-service' | ||
import type CID from 'cids' | ||
|
||
export interface BlockStore { | ||
has: (cid: CID, options?: AbortOptions) => Await<boolean> | ||
get: (cid: CID, options?: AbortOptions) => Await<Block> | ||
put: (block: Block, options?: AbortOptions) => Await<Block> | ||
putMany: (blocks: AsyncIterable<Block>|Iterable<Block>, options?: AbortOptions) => AwaitIterable<Block> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters