fix: slow-types
This commit is contained in:
@@ -29,14 +29,14 @@ export class IndexedDBStorage<TSchema extends AnyDocument = AnyDocument> extends
|
||||
this.#promise = promise;
|
||||
}
|
||||
|
||||
get db() {
|
||||
get db(): IDBPDatabase {
|
||||
if (this.#db === undefined) {
|
||||
throw new Error("Database not initialized");
|
||||
}
|
||||
return this.#db;
|
||||
}
|
||||
|
||||
async resolve() {
|
||||
async resolve(): Promise<this> {
|
||||
if (this.#db === undefined) {
|
||||
this.#db = await this.#promise;
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ export class MemoryDatabase<TOptions extends MemoryDatabaseOptions> {
|
||||
}
|
||||
}
|
||||
|
||||
get name() {
|
||||
get name(): TOptions["name"] {
|
||||
return this.options.name;
|
||||
}
|
||||
|
||||
get registrars() {
|
||||
get registrars(): TOptions["registrars"] {
|
||||
return this.options.registrars;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,11 @@ export class MemoryStorage<TSchema extends AnyDocument = AnyDocument> extends St
|
||||
this.index = new IndexManager(indexes);
|
||||
}
|
||||
|
||||
get documents() {
|
||||
get documents(): TSchema[] {
|
||||
return this.index.primary.documents;
|
||||
}
|
||||
|
||||
async resolve() {
|
||||
async resolve(): Promise<this> {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user