Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Commit 586f883

Browse files
authored
fix: fix datastore factory (#65)
* fix: fix datastore factory The factory reference type can't extend the Datastore interface directly. We want the class instance to implement the interface and not the class (Object) reference. * fix: feedback * fix: export * fix: YAGNI
1 parent 1137576 commit 586f883

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/**
44
* @typedef {import('./types').Datastore} Datastore
5-
* @typedef {import('./types').DatastoreFactory} DatastoreFactory
65
* @typedef {import('./types').Batch} Batch
76
* @typedef {import('./types').Options} Options
87
* @typedef {import('./types').Query} Query

src/types.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ export interface Batch {
1818
delete: (key: Key) => void
1919
commit: (options?: Options) => Promise<void>
2020
}
21-
22-
export interface DatastoreFactory extends Datastore {
23-
new (): Datastore
24-
}
25-
2621
export interface Datastore {
2722
open: () => Promise<void>
2823
close: () => Promise<void>

0 commit comments

Comments
 (0)