Skip to content

Commit

Permalink
chore: refactor common types (#3449)
Browse files Browse the repository at this point in the history
Addresses ipfs/js-ipfs#3442 (comment) by refactoring some of the common types used by root APIs as per #3413 

Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
Gozala and achingbrain committed Dec 18, 2020
1 parent 3b353c3 commit 73d1436
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"build:types": "tsc --build",
"coverage": "npx nyc -r html npm run test:node -- --bail",
"clean": "rimraf ./dist",
"dep-check": "aegir dep-check -i typescript -i ipfs-core -i rimraf"
"dep-check": "aegir dep-check -i typescript -i ipfs-core -i rimraf -i ipfs-core-types"
},
"dependencies": {
"any-signal": "^2.0.0",
Expand All @@ -57,6 +57,7 @@
"form-data": "^3.0.0",
"ipfs-core-utils": "^0.5.4",
"ipfs-utils": "^5.0.0",
"ipfs-core-types": "^0.1.0",
"ipld-block": "^0.11.0",
"ipld-dag-cbor": "^0.17.0",
"ipld-dag-pb": "^0.20.0",
Expand Down
6 changes: 1 addition & 5 deletions src/add-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const createOnUploadPrgress = (size, parts, progress) => {

/**
* @param {any} input
* @returns {UnixFSEntry}
* @returns {import('ipfs-core-types/src/files').UnixFSEntry}
*/
function toCoreInterface ({ name, hash, size, mode, mtime, mtimeNsecs }) {
const output = {
Expand All @@ -121,7 +121,3 @@ function toCoreInterface ({ name, hash, size, mode, mtime, mtimeNsecs }) {
// @ts-ignore
return output
}

/**
* @typedef {import('ipfs-core/src/components/add-all/index').UnixFSEntry} UnixFSEntry
*/

0 comments on commit 73d1436

Please sign in to comment.