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

[Types] DAGAPI get requires CID but should also be string|Uint8Array? #3637

Closed
@rvagg

Description

@rvagg

Ref: ceramicnetwork/js-ceramic#1194 (comment)

get: (cid: CID, options?: GetOptions & OptionExtension) => Promise<GetResult>

->

/**
* @type {import('ipfs-core-types/src/dag').API["get"]}
*/
const get = async function get (ipfsPath, options = {}) {
const {
cid,
path
} = toCidAndPath(ipfsPath)

But toCidAndPath() still allows string and Uint8Array:

/**
* @param {string|Uint8Array|CID} string
* @returns {{cid:CID, path?:string}}
*/
const toCidAndPath = (string) => {

Metadata

Metadata

Assignees

Labels

need/triageNeeds initial labeling and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions