fix: slow-types

This commit is contained in:
2026-01-05 23:23:53 +01:00
parent 4aaf12948c
commit 7bb356203f
7 changed files with 21 additions and 20 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}