withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.74k stars 2.48k forks source link

Types for db.batch are incorrect #10462

Closed wesleycoder closed 7 months ago

wesleycoder commented 8 months ago

Astro Info

Astro                    v4.5.5
Node                     v18.18.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             astro:db
                         @astrojs/db/file-url

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When using db.batch TS complains about types for the batch items array. See the minimal reproduction example (specifically the seed.ts file)

What's the expected result?

When passing an array with batch items to db.batch the types should be inferred correctly.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-iidzgz

Participation

Princesseuh commented 7 months ago

Upstream issue: https://github.com/drizzle-team/drizzle-orm/issues/1301

wesleycoder commented 7 months ago

Thanks, I'll be following that issue. :)