Search
Setup for Free
K
Kysely
•
3y ago
thelinuxlich
How do I cast the type of a eb.fn('...') ?
I tried with eb
.fn
<string
>
(
"CONCAT
"
,
[
.
.
.
.
]
) but it didn
't worked
Solution
If it doesn
't work for some reason
, you can use
eb.fn('now', []).$castTo<Date>()
eb.fn('now', []).$castTo<Date>()
Jump to solution
Kysely
Join
First came Kysely, the type-safe query builder for TypeScript, then came people asking questions, then came the Discord server.Join if you like Kysely or have questions, or both.
2,006
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
eb.
fn
(
'now'
, []).
$castTo
<
Date
>()
eb.
fn
(
'now'
, []).
$castTo
<
Date
>()
Similar Threads
eb.fn.coalesce on a subquery
K
Kysely / help
16mo ago
I need to extract the type of eb in the query chain
K
Kysely / help
8mo ago
How do I type the arguments to a function?
K
Kysely / help
3y ago