Skip to content

Releases: danvk/pg-to-ts

4.1.0

03 Apr 19:38
Compare
Choose a tag to compare

What's Changed

  • New option: --prefixWithSchemaNames. This adds the schema as a prefix to all output symbols and types. Useful for when you have many schemas in your database and need to keep all the tables straight. See #14, thanks @jamesone!
  • New feature: type links in runtime values. The runtime constants generated for each table now contain $type and $input properties, and foreign keys have a $type property to connect to the linked type. This means that typeof tableName['$type'] can be used to get the (TypeScript) table type. This should be especially helpful for libraries using pg-to-ts.

New Contributors

Full Changelog: v3.0.3...4.1.0