From 8e987d58f249b9e7dd5d62f1c9e23051c26f6ab6 Mon Sep 17 00:00:00 2001 From: dswbx Date: Thu, 19 Dec 2024 07:58:41 +0100 Subject: [PATCH] to em() toJSON to match expected type --- app/src/data/prototype/index.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/data/prototype/index.ts b/app/src/data/prototype/index.ts index 0e44138..37ca5b2 100644 --- a/app/src/data/prototype/index.ts +++ b/app/src/data/prototype/index.ts @@ -2,6 +2,7 @@ import { DummyConnection } from "data/connection/DummyConnection"; import { EntityManager } from "data/entities/EntityManager"; import type { Generated } from "kysely"; import { MediaField, type MediaFieldConfig, type MediaItem } from "media/MediaField"; +import type { ModuleConfigs } from "modules"; import { BooleanField, type BooleanFieldConfig, @@ -284,13 +285,8 @@ export function em>( entities: e.__entities, relations, indices: [], - toJSON: () => { - return e.toJSON() as unknown as { - entities: Schemas; - relations: EntityRelation[]; - indices: any[]; - }; - } + toJSON: () => + e.toJSON() as unknown as Pick }; }