Skip to content

TypeScript

The same analysis as for Rust — the catalog rebuilt from your schema or migrations, every query typed as PostgreSQL would — with code generated for TypeScript:

  1. Named queries first. The .sql files of queries/ become .d.ts declarations, with a thin runtime over pg or postgres: parameters and rows typed, null exactly where a value can be null, the return type following the number of rows.
  2. Then queries in TypeScript files. A SQL string written in a .ts file, found by the generator and typed in place, with a Vite plugin and a watch mode.

Until then, pgzest describe gives the descriptors of named queries as JSON — see Languages.

pgzest is made by Creatiwity, free and open source under the MIT or Apache-2.0 license.

GitHubLegal notice