github ts-safeql/safeql @ts-safeql/eslint-plugin@5.2.2

5 hours ago

Patch Changes

  • 3673c42: Resolve branded types to their base type when used as query parameters.

    A branded type such as string & { __brand: "ID" } is a TypeScript intersection of a base primitive and one or more marker objects. Previously it had no corresponding PostgreSQL type, so passing one as a parameter forced a manual as string cast or an overrides.types entry. The intersection's base primitive is now used (the marker objects exist only in TypeScript), so branded values map to their underlying type automatically. This also covers arrays (ID[]) and nullable unions (ID | null). Passing a branded value against an incompatible column is still reported.

Don't miss a new safeql release

NewReleases is sending notifications on new releases.