import Dexie from 'dexie' ; export interface PlaylistModel { id ? : number ; name : string ; type : 'folder' | 'normal' ; tracks : number [ ] ; } export class PlaylistsDatabase extends Dexie { folders : Dexie . Table < PlaylistModel , number > ; playlists : Dexie . Table < PlaylistModel , number > ; constructor ( dbname ) { super ( dbname ) ; this . version ( 1 ) . stores ( { folders : '++id, name' , playlists : '++id, name' , } ) ; } }