fix many, many more type errors

This commit is contained in:
2023-09-03 10:02:17 -06:00
parent b8aaffbf8d
commit b05b602acd
15 changed files with 170 additions and 97 deletions

View File

@@ -1,4 +1,10 @@
import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import {
createRouter,
createWebHistory,
NavigationGuardNext,
RouteLocationNormalized,
RouteRecordRaw,
} from "vue-router";
import { accountsDB } from "@/db";
/**
@@ -7,7 +13,11 @@ import { accountsDB } from "@/db";
* @param from :RouteLocationNormalized
* @param next :NavigationGuardNext
*/
const enterOrStart = async (to, from, next) => {
const enterOrStart = async (
to: RouteLocationNormalized,
from: RouteLocationNormalized,
next: NavigationGuardNext,
) => {
await accountsDB.open();
const num_accounts = await accountsDB.accounts.count();
if (num_accounts > 0) {
@@ -190,7 +200,11 @@ const router = createRouter({
routes,
});
const errorHandler = (error, to, from) => {
const errorHandler = (
error: any,
to: RouteLocationNormalized,
from: RouteLocationNormalized,
) => {
// Handle the error here
console.error("Caught in top level error handler:", error, to, from);