Skip to content

Commit

Permalink
Générique
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Oct 28, 2024
1 parent 327e0cd commit 4c1df17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

declare module "@orbitdb/core" {
import EventEmitter from "events";
import type { HeliaLibp2p } from "helia";
import { Libp2p } from "@libp2p/interface";
import type { PeerId } from "@libp2p/interface";

export function Database(args: {
Expand Down Expand Up @@ -61,8 +63,8 @@ declare module "@orbitdb/core" {
identity: Identity;
peerId;
};
export function createOrbitDB(args: {
ipfs: HeliaLibp2p;
export function createOrbitDB<T extends Libp2p = Libp2p>(args: {
ipfs: HeliaLibp2p<T>;
id?: PeerId;
identity?: Identity;
identities?: typeof Identities;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@constl/orbit-db-types",
"private": false,
"version": "2.0.4",
"version": "2.0.5",
"description": "Unofficial typings for orbit-db",
"types": "index.d.ts",
"type": "module",
Expand Down

0 comments on commit 4c1df17

Please sign in to comment.