Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: mark ipld options as partial #3669

Merged
merged 4 commits into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ipfs-core/src/components/ipld.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const Ipld = require('ipld')
/**
* @param {Object} config
* @param {import('ipfs-block-service')} config.blockService
* @param {import('ipld').Options} [config.options]
* @param {Partial<import('ipld').Options>} [config.options]
*/
const createIPLD = ({ blockService, options }) => {
return new Ipld(getDefaultIpldOptions(blockService, options))
Expand Down
3 changes: 2 additions & 1 deletion packages/ipfs-core/src/runtime/ipld.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const multicodec = require('multicodec')

/**
* @typedef {import('interface-ipld-format').Format<?>} IPLDFormat
* @typedef {import('ipld').Options} IPLDOptions
*/

/**
Expand All @@ -26,7 +27,7 @@ const IpldFormats = {

/**
* @param {import('ipfs-block-service')} blockService
* @param {import('ipld').Options} [options]
* @param {Partial<IPLDOptions>} [options]
*/
module.exports = (blockService, options) => {
return mergeOptions.call(
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core/src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface Options {
* (https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs/src/core/runtime/ipld.js)
* in browsers)
*/
ipld?: IPLDOptions
ipld?: Partial<IPLDOptions>

/**
* The libp2p option allows you to build
Expand Down