-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
Create a TypeScript wrapper library for the SQLite file.
Example:
JMdict.getEntry({written: 'ねこ'}); // -> returns entry object of ねこ.What's the purpose?
To make integration into TypeScript applications easier, without requiring every developer to write raw SQL queries or build their own wrapper. The wrapper would provide typed results (Entry, Sense, etc.) and handle JSON deserialization consistently.
How do you think it should be implemented?
The wrapper should live in a separate repository (e.g. JMdictSQLite-ts), so that this project remains language-agnostic.
The wrapper would accept a local path to the SQLite file (path/to/jmdict.sqlite), rather than bundling or auto-updating the database itself. This keeps the database and the wrapper decoupled, and allows users to fetch the latest database in whatever way works best for their setup.
The wrapper would export ergonomic methods such as:
getEntry({written: string}): EntrygetEntries({written: string}): Entry[]getSense({glosses: string}): Sense- etc.
This way, the base project remains a pure SQLite export of JMdict, while the wrapper provides convenience for TypeScript developers. Other wrappers (Python, Rust, etc.) could be built in the same way.