Numeric type returns number instead of string as defined in TypeScript
Hello, I'm trying Drizzle ORM with PostgreSQL and TypeScript. I've noticed a discrepancy between the TypeScript definitions and the actual runtime behavior for numeric fields.
Schema definition:
The request
The type of result is inferred as:
However, when I log the actual value of startingCapital, it's a number:
Expected behavior: startingCapital should be a string to match the TypeScript definition. Actual behavior: startingCapital is a number.
My version are :
"drizzle-orm": "^0.33.0",
"drizzle-kit": "^0.24.2"
I just want the type and runtime value to match, regardless of whether it's a string or a number
0 Replies