elysiajs / eden

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

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

Open m1212e opened 3 months ago

m1212e commented 3 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?