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.

feat: re-export component APIs #4233

Closed as not planned
Closed as not planned
@DougAnderson444

Description

@DougAnderson444

import { DagAPI } from './dag/index.js'

Could we re-export the component APIs (such as DagAPI) so they can be extended in other packages?

// ipfs-core/src/components/index.js
export { DagAPI, PinAPI, BlockAPI } 

and

"exports": {
    "./components": {
      "types": "./src/components/index.d.ts",
      "import": "./src/components/index.js"
    }
  },

Then I can do

// myClass.js
import { DagAPI } from 'ipfs-core/components'

class CustomDagRepo extends DagAPI { 
}

I've been using a deep reference for this already, so I thought I'd request this small change.

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions