Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: type errors in tab service

Andrew Bastindeedf35bf0dc
diff --git a/packages/hoppscotch-common/src/services/tab/tab.ts b/packages/hoppscotch-common/src/services/tab/tab.ts
index cf3699040..53da2a626 100644
--- a/packages/hoppscotch-common/src/services/tab/tab.ts
+++ b/packages/hoppscotch-common/src/services/tab/tab.ts
@@ -20,7 +20,10 @@ export abstract class TabService<Doc>
extends Service
implements TabServiceInterface<Doc>
{
- protected tabMap = reactive(new Map<string, HoppTab<Doc>>())
+ protected tabMap = reactive(new Map<string, HoppTab<Doc>>()) as Map<
+ string,
+ HoppTab<Doc>
+ > // TODO: The implicit cast is necessary as the reactive unwraps the inner types, creating weird type errors, this needs to be refactored and removed
protected tabOrdering = ref<string[]>(["test"])
public currentTabID = refWithControl("test", {