Closed sambecker closed 1 month ago
In order to accept undefined in queries, I've applied the following configuration:
undefined
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?
In order to accept
undefined
in queries, I've applied the following configuration:But then TypeScript says its usage is not valid:
Is there a recommended approach to loosen the types?