You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1 | // https://bun.sh/docs/api/http#bun-serve
2 | const a: string = "hello";
^
SyntaxError: Unexpected token ':'. const declared variable 'a' must have an initializer.
at <parse> (/Users/dtinth/Projects/elysia-by-example/hello.ts:2:1)
at native:11:43
note: missing sourcemaps for /Users/dtinth/Projects/elysia-by-example/hello.ts
note: consider bundling with '--sourcemap' to get unminified traces
Bun v1.1.40 (macOS arm64)
What version of Bun is running?
1.1.40+b5b51004e
What platform is your computer?
Darwin 24.1.0 arm64 arm
What steps can reproduce the bug?
Run this:
What is the expected behavior?
Output should be:
What do you see instead?
SyntaxError is thrown:
Additional information
The repro case can be reduced to:
Without the comment, it works:
With the comment not containing
#bun
, it works:With the comment containing
#bun
immediately followed by an alphanumeric character, it works:The text was updated successfully, but these errors were encountered: