-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Export IPFS instance type #3439
Changes from all commits
daaeaa9
5cde0a5
6dff406
0dfe6d2
cdd60e3
d3e2cfe
2405c1c
76939dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -2,4 +2,13 @@ | |||||||||||||
|
||||||||||||||
const IPFS = require('ipfs-core') | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be simpler to do this instead
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does not work because Generated declare const _exports: typeof import('ipfs-core/src')
export = _exports;
export type IPFS = import('ipfs-core/src/components'); We can't use import type IPFS from "ipfs" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Xmader I realize that, but point I was trying to make is, having export type import { IPFS, create } from "ipfs" Furthermore I expect that as we adopt approach proposed in #3413 we might end up with That said, it's an @achingbrain call |
||||||||||||||
|
||||||||||||||
/** | ||||||||||||||
* Export IPFS instance type | ||||||||||||||
* | ||||||||||||||
* This will overlap onto the default export | ||||||||||||||
* in the generated `d.ts` file | ||||||||||||||
* | ||||||||||||||
* @typedef {import('ipfs-core').default} IPFS | ||||||||||||||
*/ | ||||||||||||||
|
||||||||||||||
module.exports = IPFS |
Uh oh!
There was an error while loading. Please reload this page.