mammoth
mammoth copied to clipboard
How to configure db.count() to return a `number` type?
I found this related thread: https://github.com/Ff00ff/mammoth/issues/176
In my codebase, we've configured node-pg to return a typescript number
if the data type is postgres BIGINT.
Is there a way to configure mammoth to tag this return type with number
instead of string
?
const {count} = (await db.count() ...);
// The type-system thinks `count` is a string, but the runtime value is number.