Closed danieleguglietti closed 3 years ago
Can you provide some code showing the issue?
This is the schema
And this is the error I mentioned, since DBSchema's key are marked as string
Can you copy and paste the code so I don't have to type it out myself?
You example code works fine on the TypeScript playground.
I'm happy to help, but you must create a reduced example of the problem. I'll reopen this if you do that.
Hello everyone! I was trying the lib and using schemas for DB typing following the reference. The error occurs when I try to create the "connection" to the DB and create a store, the type the "createObjectStore" function expect is "never" when my interface extends DBSchema. After a deep look, I noticed that the "KnowKeys" type excludes the string type and that's ok because we want the keys' names as type, but the interface DBSchema declares its keys as a string and making it impossible to take keys names as type... In the reference, in the "Typescript" section it extends the interface to DBSchema, which is wrong causing the error mentioned above. Am I doing wrong/have I missed something in the reference? Or this is actually a project error?