© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
DT
Drizzle Team
•
2y ago
•
2 replies
BubbleTrouble
Get type from select object ?
Is it possible to get the type from my select object
? I know its inferred in the response
, which gives me the correct type
. But i want to be able also set the type myself so it can be used in other files
.
const SourceSelectFields
=
{
siteCode
: mapboxSources
.siteCode
,
id
: mapboxSources
.id
,
type
: mapboxSources
.type
,
url
: mapboxSources
.url
,
isFunction
: mapboxSources
.isFunction
,
tiles
: sql
json_group_array(${mapboxSourceTiles.tile})
json_group_array(${mapboxSourceTiles.tile})
.mapWith
(
(json
: string
)
=
> JSON
.parse
(json
) as string
[
]
)
,
}
;
type SourceWithField
= typeof SourceSelectFields
/
/For instance something like so
?
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Custom `Select` object returns type `any`
DT
Drizzle Team / help
3y ago
MySQL select().from() type
DT
Drizzle Team / help
2y ago
Get type for select query?
DT
Drizzle Team / help
3y ago