In order to accept undefined in queries, I've applied the following configuration:
export const sql = postgres(process.env.POSTGRES_URL, {
transform: { undefined: null },
});
But then TypeScript says its usage is not valid:
// TS Error: 'ParameterOrFragment<never>'.ts(2769)
sql`UPDATE table SET field=${undefined} WHERE id=${1}`
Is there a recommended approach to loosen the types?