()
| 7 | let _db!: AppDatabase; |
| 8 | |
| 9 | export function getDB() { |
| 10 | // eslint-disable-next-line |
| 11 | if (!_db) { |
| 12 | throw new Error('DB not set'); |
| 13 | } |
| 14 | return _db; |
| 15 | } |
| 16 | |
| 17 | export async function initializeDbIfNeeded(factory: () => Promise<AppDatabase>) { |
| 18 | // eslint-disable-next-line |
no outgoing calls
no test coverage detected
searching dependent graphs…