Adds an initial account as long as there are no available accounts.

This commit is contained in:
Matthew Aaron Raymer
2022-12-15 17:52:42 +08:00
parent 3ac8f911ac
commit c9d5ab82fd
2 changed files with 21 additions and 17 deletions

View File

@@ -1,7 +1,6 @@
import BaseDexie from "dexie";
import { encrypted, Encryption } from "@pvermeer/dexie-encrypted-addon";
import { accountsSchema, AccountsTable } from "./tables/accounts";
type DexieTables = AccountsTable;
/**
* In order to make the next line be acceptable, the program needs to have its linter suppress a rule:
@@ -11,9 +10,8 @@ type DexieTables = AccountsTable;
*
* https://9to5answer.com/how-to-bypass-warning-unexpected-any-specify-a-different-type-typescript-eslint-no-explicit-any
*/
//export type Dexie<T extends any = DexieTables> = BaseDexie & T;
type DexieTables = AccountsTable;
export type Dexie<T extends unknown = DexieTables> = BaseDexie & T;
export const db = new BaseDexie("kickStarter") as Dexie;
const schema = Object.assign({}, accountsSchema);