adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.92k stars 95 forks source link

feat!: make nullable scalar parameters optional #482

Closed adelsz closed 1 year ago

adelsz commented 1 year ago

Nullable scalar parameters can now be omitted from parameter objects:

export interface IGetNotificationsParams {
-  userId: string | null | void;
+  userId?: string | null | void;
}

Meaning you no longer have to pass undefined explicitly to such queries:

const result = findBookNameOrRank.run({
  rank: 1,
- name: undefined
}, client);
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
pgtyped ✅ Ready (Inspect) Visit Preview Jan 27, 2023 at 6:09PM (UTC)