Skip to content

Commit 73d1436

Browse files
Gozalaachingbrain
andauthored
chore: refactor common types (#3449)
Addresses ipfs/js-ipfs#3442 (comment) by refactoring some of the common types used by root APIs as per #3413 Co-authored-by: achingbrain <[email protected]>
1 parent 3b353c3 commit 73d1436

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"build:types": "tsc --build",
4848
"coverage": "npx nyc -r html npm run test:node -- --bail",
4949
"clean": "rimraf ./dist",
50-
"dep-check": "aegir dep-check -i typescript -i ipfs-core -i rimraf"
50+
"dep-check": "aegir dep-check -i typescript -i ipfs-core -i rimraf -i ipfs-core-types"
5151
},
5252
"dependencies": {
5353
"any-signal": "^2.0.0",
@@ -57,6 +57,7 @@
5757
"form-data": "^3.0.0",
5858
"ipfs-core-utils": "^0.5.4",
5959
"ipfs-utils": "^5.0.0",
60+
"ipfs-core-types": "^0.1.0",
6061
"ipld-block": "^0.11.0",
6162
"ipld-dag-cbor": "^0.17.0",
6263
"ipld-dag-pb": "^0.20.0",

src/add-all.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const createOnUploadPrgress = (size, parts, progress) => {
9898

9999
/**
100100
* @param {any} input
101-
* @returns {UnixFSEntry}
101+
* @returns {import('ipfs-core-types/src/files').UnixFSEntry}
102102
*/
103103
function toCoreInterface ({ name, hash, size, mode, mtime, mtimeNsecs }) {
104104
const output = {
@@ -121,7 +121,3 @@ function toCoreInterface ({ name, hash, size, mode, mtime, mtimeNsecs }) {
121121
// @ts-ignore
122122
return output
123123
}
124-
125-
/**
126-
* @typedef {import('ipfs-core/src/components/add-all/index').UnixFSEntry} UnixFSEntry
127-
*/

0 commit comments

Comments
 (0)