drizzle-team / drizzle-team/drizzle-orm
[BUG]: Types do not show up properly if you put $type before array
Open
bug
bug/fixed-in-beta
db/postgres
priority
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
0.29.2
### What version of `drizzle-kit` are you using?
0.20.9
### Describe the Bug
```ts
someField: jsonb('someField')
.$type<{ test: string; }>()
.array()
```
Fetched postgres response shows that someField is an unknown type. If you put `.array()` before `.$type`, then it works as expected.
### Expected behavior
It should either return the correct type regardless of order, or show a type error if the order is incorrect.
### Environment & setup
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.