elysiajs / eden

Fully type-safe Elysia client
MIT License
147 stars 37 forks source link

feat: export Treaty namespace from treaty2 #111

Closed Vahelnir closed 1 month ago

Vahelnir commented 2 months ago

Hi,

While implementing a simple composable to facilitate using treaty2 with Nuxt, I noticed that treaty2's Treaty namespace and TreatyResponse type were not exported. We can currently import EdenTreaty and EdenFetch from @elysiajs/eden/treaty and @elysiajs/eden/fetch respectively, but not Treaty.

I also noticed that the types Treaty, EdenTreaty and EdenFetch were imported by the entrypoint, but were never used at all. Were they meant to be exported here ?

I'm not sure what solution would preferred, so I implemented two different solutions in two different commits: