Having an issue where I am trying to add type to computed but keep encountering this error:
Overload 1 of 2, '(getter: ComputedGetter<AuthFormType>, debugOptions?: DebuggerOptions | undefined): ComputedRef<AuthFormType>', gave the following error
. Any ideas on how to properly add type to computed?
File: Auth.vue
type AuthFormType = 'Form1' | 'Form2';
const getForm = computed<AuthFormType>(
() => tabs.value.find((tab) => tab.id === currentTab.value)!.component, // will return Form1 or Form2
);
Adding a simple type like string as shown in the documentation here works, but I specifically need to incorporate the type AuthFormType.