drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
23.14k stars 564 forks source link

[BUG]: Drizzle typebox not supporting array #1810

Open renesass opened 7 months ago

renesass commented 7 months ago

What version of drizzle-orm are you using?

0.29.2

What version of drizzle-kit are you using?

0.20.13

Describe the Bug

Hey! I'm using drizzle together with typebox and I get the wrong types when using array. See the following example:

import { pgTable } from 'drizzle-orm/pg-core'
import { createSelectSchema } from 'drizzle-typebox'

const shop = pgTable('shop', {
  images: text('images').array()
})

const shopSchema = createSelectSchema(shop)

// Creates the following object:
// TObject<{ images: TNullable<TString>; }>

Probably related to #1416?

Expected behavior

// TObject<{ images: TNullable<TArray<TString>>; }>

Environment & setup

No response

AndriiSherman commented 7 months ago

Marked this PR to be merged

elliotnash commented 1 month ago

Any updates on this? This still seems to be a problem as of drizzle-orm 0.32.2.