Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support specifying a typed schema for db #34

Open
R-omk opened this issue Nov 16, 2024 · 1 comment
Open

Support specifying a typed schema for db #34

R-omk opened this issue Nov 16, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@R-omk
Copy link

R-omk commented Nov 16, 2024

TypeScript offers amazing possibilities, one of which is "type inference."

The project most similar in spirit from the world of JavaScript is IndexedDB. In the example from the link below, you can see how a declared type allows you to both create tables with the required schema and later use that type when performing operations with data in the database.

https://github.com/jakearchibald/idb?tab=readme-ov-file#typescript

@vitaliy-art vitaliy-art self-assigned this Nov 18, 2024
@vitaliy-art vitaliy-art added the enhancement New feature or request label Nov 18, 2024
@vitaliy-art
Copy link
Owner

Yeah, i'm planning add something like typed generics in retrieval methods. Something like box.space.get<Band>('bands').get(key) or, maybe, box.space.get('bands').get<Band>(key). I'm sure it'll be so usefull feature

@vitaliy-art vitaliy-art added this to the v1.0.0 milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants