pow-co / run-db

An indexer that crawls the blockchain and calculates RUN states
MIT License
0 stars 0 forks source link

Add Typed Responses to Sqlite Queries That Are Current "any" type #7

Open owenkellogg opened 1 year ago

owenkellogg commented 1 year ago

./src/database.ts defines a large number of sqlite queries which return Unknown types.

An ideal solution would be to allow Statement to be a generic template that can define the return type such as Statement<params P, returns R>.

Lacking such a most elegant solution, define return types for each statement.