mammoth icon indicating copy to clipboard operation
mammoth copied to clipboard

How to configure db.count() to return a `number` type?

Open echentw opened this issue 2 years ago • 0 comments

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.

echentw avatar Sep 19 '22 23:09 echentw