Not getting a typescript error for insert

import { db } from "./db";
import {users} from "./schema";

// gives no error, but it should ??
const val = { name: 'a',incorrectFieldName: 2 };
await db.insert(users).values(val)                   

// gives error "Object literal may only specify known properties"
await db.insert(users).values({ name: 'a', incorrectFieldName: 2 })   

you can copy paste here https://drizzle.run/
Was this page helpful?