import * as localforageUntyped from '../node_modules/localforage/dist/localforage.min.js' ; const localforage = localforageUntyped as typeof import ( 'localforage' ) ; let lastProm = Promise . resolve ( null ) ; export const getDB = async ( ) => { await lastProm ; lastProm = localforage . getItem < SavedComments > ( 'cpuserscriptCommentHistoryCheckerSavedComments' ) ; return ( await lastProm ) || { } ; } ; export const setDB = async ( newData ) => { await lastProm ; lastProm = localforage . setItem ( 'cpuserscriptCommentHistoryCheckerSavedComments' , newData ) ; return lastProm ; } ;