fix(db): 🏷️ update types to allow async filter for listing ressources
This commit is contained in:
parent
3b378b0968
commit
2028c0134a
|
@ -55,8 +55,9 @@ export class Db {
|
|||
set: (ressources: T[]) => this.#set<T>(type, ressources),
|
||||
delete: (ressources: Pick<T, 'uuid'>[]) =>
|
||||
this.#delete<T>(type, ressources),
|
||||
list: (filter: (ressource: T) => boolean = () => true) =>
|
||||
this.#list<T>(type, Builder, filter),
|
||||
list: (
|
||||
filter: (ressource: T) => boolean | Promise<boolean> = () => true,
|
||||
) => this.#list<T>(type, Builder, filter),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue