From 8e3a53a2ca9a351681cafe053ff1d49f7900b20d Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 14 Apr 2024 17:32:48 +0200 Subject: [PATCH] Fix get items cache (#51) * fix getItems type * changeset --- .changeset/mean-clocks-leave.md | 5 +++++ packages/engine/src/index.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/mean-clocks-leave.md diff --git a/.changeset/mean-clocks-leave.md b/.changeset/mean-clocks-leave.md new file mode 100644 index 0000000..647dfce --- /dev/null +++ b/.changeset/mean-clocks-leave.md @@ -0,0 +1,5 @@ +--- +"@navita/engine": patch +--- + +fix getItems type diff --git a/packages/engine/src/index.ts b/packages/engine/src/index.ts index af556a8..2745955 100644 --- a/packages/engine/src/index.ts +++ b/packages/engine/src/index.ts @@ -300,7 +300,9 @@ export class Engine { return Object.keys(caches).reduce((acc, key) => ({ ...acc, [key]: this.caches[key as CacheKeys].items(caches[key as CacheKeys]), - }), {}); + }), {} as { + [K in CacheKeys]?: ReturnType; + }); } clearUsedIds(filePath: string) {