We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I assume this is unintentional because:
static
routes
websocket
import index from "./index.html"; import { Elysia } from "elysia"; const app = new Elysia(); // ... Bun.serve({ routes: { "/": index }, // ERROR in typescript // static: { "/": index }, // typescript is happy with this (though it's deprecated) fetch: (req, server) => { if (!server.upgrade(req)) { return app.handle(req); } }, websocket: { message: (ws, message) => { /* ... */ }, }, });
bun/packages/bun-types/bun.d.ts
Lines 4495 to 4512 in 078318f
Lines 4107 to 4124 in 078318f
The text was updated successfully, but these errors were encountered:
I'm also unable to implement routes due to this issue. Is there any sort of short-term workaround?
EDIT: apologies, I forgot that bun add @types/bun doesn't update to the latest types if it's already installed. I might not have an issue.
bun add @types/bun
Sorry, something went wrong.
alii
No branches or pull requests
I assume this is unintentional because:
static
property thatroutes
is replacing works fine alongsidewebsocket
Example of what I'm trying to do:
Relevant Bun code:
bun/packages/bun-types/bun.d.ts
Lines 4495 to 4512 in 078318f
bun/packages/bun-types/bun.d.ts
Lines 4107 to 4124 in 078318f
The text was updated successfully, but these errors were encountered: