ipfs / js-ipfs-bitswap

JavaScript implementation of Bitswap 'data exchange' protocol used by IPFS
Other
68 stars 48 forks source link

SortedMap signature mismatch from Map #617

Open linuxninja39 opened 6 months ago

linuxninja39 commented 6 months ago

I’ve done a fresh install of helia, I’m on typescript 4.9.5 and node 21.4.0. When trying to compile my project I’m getting the following error.

Error: node_modules/ipfs-bitswap/dist/src/utils/sorted-map.d.ts:24:5 - error TS2416: Property ‘forEach’ in type ‘SortedMap<Key, Value>’ is not assignable to the same property in base type ‘Map<Key, Value>’. Type ‘(cb: (entry: [Key, Value]) => void, thisArg?: SortedMap<Key, Value> | undefined) => void’ is not assignable to type ‘(callbackfn: (value: Value, key: Key, map: Map<Key, Value>) => void, thisArg?: any) => void’. Types of parameters ‘cb’ and ‘callbackfn’ are incompatible.

This is happening with both ipfs-bitswap 19 and 20.

welcome[bot] commented 6 months ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.