knadh / localStorageDB

A simple database layer for localStorage and sessionStorage for creating structured data in the form of databases and tables
http://nadh.in/code/localstoragedb
814 stars 128 forks source link

I don't know if there's a bug in localstoragedb.d.ts or if I'm using it wrong. #96

Closed ilarkShim closed 2 years ago

ilarkShim commented 2 years ago

I'm using localstoragedb in msw and I'm getting an error in typescript.

The code location in localstoragedb.d.ts is below.

  1. I get an error saying that the module cannot be found because of the case mismatch.
declare module 'localstoragedb' {
    export = localStorageDB;
}
  1. An error occurs when params is omitted.
 queryAll(table: string, params?: localStorageDB_queryParams): localStorageDB_fields[];
knadh commented 2 years ago

Hi @ilarkShim. This lib hasn't required active maintenance in a long time. The JS version works fine and I could possibly help with that, but the TS version was an external contribution which I am not familiar with. It could be a bug in there but it's unlikely to be solved as it's unmaintained. Apologies.

ilarkShim commented 2 years ago

Thanks for your reply. I'll fork it and use it after modifying it.