Skip to content

(feature): TypeScript wrapper for the SQL database #20

@seanmcbroom

Description

@seanmcbroom

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}): Entry
  • getEntries({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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions