elysiajs / eden

Fully type-safe Elysia client
MIT License
173 stars 41 forks source link

feat: export Treaty namespace from treaty2 #111

Closed Vahelnir closed 4 months ago

Vahelnir commented 4 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: