numeric returns string when querying with Postgres

NNxia6185/11/2023
export const order = pgTable(
  'orders', {
  ...
  totalValue: numeric('total_value', { precision: 10, scale: 2 }),
  ...
})

inspecting order.totalValue I get type

PgNumeric<{
    tableName: "orders";
    name: "total_value";
    data: string;
    driverParam: string;
    notNull: false;
    hasDefault: false;
}>


but when I do a query such as

await db
        .insert(order)
        .values({
          ...input,
        })
        .returning();


The result is inferred as string | null for this column rather than number | null
Rrphlmr5/11/2023