sqltyper

JSON →
library 1.3.2 ·javascript
verified Jun 5, 2026

sqltyper 1.3.2 generates typed TypeScript functions from raw PostgreSQL queries by analyzing schema from a running database. It connects to a PostgreSQL database, parses SQL files containing queries with parameter placeholders (${param} or :param), and outputs .ts files with correct TypeScript types for parameters and result rows. Unlike ORMs or query builders, it works directly with SQL while providing compile-time type safety. Compatible with node-postgres, postgres.js, and pg-promise runtime libraries. Released via npm, with active development on GitHub.