From aefdacbf59b60c353ac622a388085a150ea8e957 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Tue, 18 Jun 2024 10:29:21 +0200 Subject: [PATCH] refactor: :recycle: fix types and update import to import type --- src/models/utils/ref.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 }) } }