-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Types] IPFS.create() options uses Libp2pConfig instead of Libp2pOptions #3640
Comments
This should be the same as https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-core/src/components/libp2p.js#L16 . |
Ah, annoying - @vasco-santos that type doesn't actually look like it's used anywhere in the file. I wish our linter would pick that up. |
https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-core/src/components/libp2p.js#L70 this function should return it, right? |
We'd need to add a That'd be fine initially but if we removed a property or something it'd just update the inferred return type rather than erroring on the change. |
Some of the types need a little correcting. Fixes #3640
Some of the types need a little correcting. Fixes #3640
Some of the types need a little correcting. Fixes #3640
Some of the types need a little correcting. Fixes #3640
Ref: ceramicnetwork/js-ceramic#1194 (comment)
js-ipfs/packages/ipfs-core/src/types.d.ts
Line 8 in 63b11e5
Sooo .. it looks like what's going on here is that ipfs-core is pulling in
Libp2pConfig
when it should be pulling inLibp2pOptions
becauseLibp2pConfig
is used for theconfig
property insideLibp2pOptions
. So in ceramicnetwork/js-ceramic#1194 I was having to pull up the elements in thelibp2p.config
object intolibp2p
to satisfy this condition. I think this should just be:The text was updated successfully, but these errors were encountered: