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

Commit 2ef78ee

Browse files
authored
fix: simplify ts example (#233)
If we import the CID type from ipfs-core we don't need the extra multiformats dep.
1 parent 948ad3b commit 2ef78ee

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

examples/types-use-ipfs-from-ts/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"test": "tsc --noEmit"
99
},
1010
"dependencies": {
11-
"ipfs-core": "^0.14.0",
12-
"multiformats": "^9.4.1"
11+
"ipfs-core": "^0.14.0"
1312
},
1413
"devDependencies": {
1514
"typescript": "^4.5.5"

examples/types-use-ipfs-from-ts/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IPFS, create } from 'ipfs-core'
2-
import { CID } from 'multiformats/cid'
2+
import type { CID } from 'ipfs-core'
33

44
export default async function main() {
55
const node = await create()

0 commit comments

Comments
 (0)