VSCode Intellisense Error: "Type 'PgTableWithColumns... is not assignable to type 'SQL<unknown>..."
Hey, im new to Drizzle and am encountering this intelliselse error on VSCode. Notably the code runs fine.
I am using Planetscale and Cloudflare Pages Functions.
Thank you in advance!
Schema
Query
Error
![No description](https://cdn.answeroverflow.com/1216305462949970001/image.png)
3 Replies
@IEatBeans this is a typescript issue when your project runs and constantly recompiles. try starting a typescript build task in watch mode in a separate terminal, so follow this route: toolbar -> terminal -> run task -> typescript -> watch. then your errors may be gone, moreover your whole project will be scanned for type errors as this task is live no matter what files you got opened atm
Hello, @IEatBeans! You just need to provide keys in object:
wait, you should use
mysqlTable
instead of pgTable
, because planetscale is MySQL databaseAh ok, that makes sense. I thought it was weird that it was wanting to use pg, idk where in the docs I found that. Must have copied it from the wrong section