Show HN: TypeSQL – Postgres SQL parsed in TypeScript's type system, no codegen
Category: devtools
Tags: typescript, sql, postgres, type-level, compile-time
Score: 7.5/10 (Innovation: 8, Technical: 9, Documentation: 7, Utility: 6)
TypeSQL is a TypeScript library that parses SQL string literals entirely within TypeScript's type system, providing compile-time type inference, parameter validation, and schema checking without code generation or a database connection. It leverages advanced type-level programming to achieve this, integrating with popular drivers and ORMs like pg, postgres, Kysely, Drizzle, and Prisma, making SQL queries type-safe and ergonomic.
Target audience: backend devs
Repository: https://github.com/ismailkarsli/typesql · TypeScript · MIT · 3 stars
View on Hacker News