elysiajs / eden

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

Optional query parameters require an empty object to be passed #94

Open m1212e opened 6 months ago

m1212e commented 6 months ago

When defining an endpoint with optional query parameters like this:

query: t.Optional(
        t.Object({
          role: t.Optional(t.String()),
          user: t.Optional(t.String()),
        }),
      ),

and using the eden treaty to call that endpoint: image I must provide an empty object to satisfy typescript image

Maybe this can be adjusted?