-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type wants me to add .index
to api function chain before HTTP verb after v1.0
#71
Comments
.index
to api function chain before HTTP verb after 1.0.index
to api function chain before HTTP verb after v1.0
I can fix this depending on what the actual expectations are. Leave
|
I am expecting I would prefer not to have to add Also this only seems to be an issue with routes behind import { edenTreaty } from "@elysiajs/eden";
import Elysia from "elysia";
const helloHandlers = new Elysia().get("", () => "hello");
const routes = new Elysia()
.get("/goodbye", () => "bye")
.group("/hello", (_) => _.use(helloHandlers));
const app = new Elysia().use(routes).listen(3000);
const eden = edenTreaty<typeof app>("localhost:3000");
console.log((await eden.hello.get()).data); // <-- has red squiggly, but works!
console.log((await eden.hello.index.get()).data); // <-- no red squiggly, "NOT_FOUND"
console.log((await eden.goodbye.get()).data); // <-- no squiggly, working as expected
app.stop(); |
"@elysiajs/eden": "1.0.5",
"elysia": "1.0.7"
index.ts:
output from running:
Error message:
The text was updated successfully, but these errors were encountered: