You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can basically serve this on an endpoint and I can consume it on my frontend for my client by saving it somewhere in src after a curl script. It's super cool since I wouldn't need to share these types via an intermediary npm package.
The Feature Request
Is there any way we can also "inline" the types from external dependencies? 'elysia', 'geojson', 'lucia' for example. So that I wouldn't need to bun add -D @types/elysia @types/geojson @types/lucia on the client.
Suggested solution
Not too sure...
A great API addition would probably be dts({ rollupTypes: true, inlineExternalDeps: true }) though.
Why I want this? I wrote it above. But for more context: I have separate client and backend repos for ElysiaJS. It's a typesafe backend like tRPC and similarly, it only works in monorepos, or if the type definitions are shared via an npm package. I have a polyrepo client and backend separate repos.
In any case, vite-plugin-dts already takes care of the transpilation for me. The type definitions from external libraries are also pretty much at the top anyway. So my work-around would be just to reinstall the types via the client repo (bun install -D @types/*)
Description
Context
My goal currently is to generate the
App
type for my ElysiaJS server (basically the same as tRPC). So I can use it for my client on the frontend.So far it works great. Here's my Config:
It then generates a file like this:
I can basically serve this on an endpoint and I can consume it on my frontend for my client by saving it somewhere in
src
after acurl
script. It's super cool since I wouldn't need to share these types via an intermediary npm package.The Feature Request
Is there any way we can also "inline" the types from external dependencies? 'elysia', 'geojson', 'lucia' for example. So that I wouldn't need to
bun add -D @types/elysia @types/geojson @types/lucia
on the client.Suggested solution
Not too sure...
A great API addition would probably be
dts({ rollupTypes: true, inlineExternalDeps: true })
though.Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: