diff --git a/src/models/utils/ref.ts b/src/models/utils/ref.ts index a78afeb..7b0a316 100644 --- a/src/models/utils/ref.ts +++ b/src/models/utils/ref.ts @@ -1,4 +1,4 @@ -import { Db } from '@/mod.ts' +import type { Db } from '@/mod.ts' import type { UUID } from '@/types.ts' import { Credential, @@ -38,8 +38,9 @@ export class Ref extends String { } static dbResolver(db: Db) { - return (ref: RefString) => { + return (ref: RefString): Promise => { const { type, uuid } = Ref.parse(ref) + //@ts-expect-error force type casting to fix return db.ressource[type].get({ uuid }) } }