Replies: 1 comment
-
@hill try adding @types/bun to your devDependencies on the client, this fixed it for me after @SaltyAom suggested it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm very new to Elysia and am trying to understand its capabilities.
When reading this doc about the Eden treaty response, I understand that the type of the
data
field should be typed - as suggested in the code snippet on that page:However when I try to do this with a monorepo setup (A client package and server package, with the tsconfig.json in client referencing the server directory), the typehint has
data
asany
:I noticed in the overview docs, that the post data response (
nendoroid
) is typed asany
on hover:Is it intended that the
post()
method does not havedata
type inferred from the server response?Sorry If I missed documentation outlining this - would love to be pointed to it.
For reference my server code looks like:
and my treaty:
My client call is:
In client dependencies,
"@elysiajs/eden": "^1.1.3",
and on server dependencies:
"elysia": "^1.1.3"
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions