It should also become a function in my opinion. Please let me know if i missed something or you need a reproduction repo!
Workaround / Repro:
export const api = new Elysia({ prefix: '/api' })
// Never called just used for types
.get('/files/:path', ({ params }) => {
return doStuff(params.path);
})
.get('/files/*', ({ params }) => {
return doStuff(params['*']);
});
export type Api = typeof api;
async function clientCode() {
await apiClient.api.files({ path: '/test/path' }).get();
}
Problem
It currently is not possible to provide wildcard parameters with eden treaty.
With dynamic params the client type is this:
With a wildcard it becomes this:
It should also become a function in my opinion. Please let me know if i missed something or you need a reproduction repo!
Workaround / Repro: