Open chalabi2 opened 1 year ago
Still happens in 1.0.6
Having the same issue! For context, it's happening with me in an an app that doesn't need "bun-types" for its runtime but references "bun-types" indirectly through importing the type schema from my backend in an edenTreaty like so:
import { edenTreaty } from "@elysiajs/eden/treaty";
import type { ElysiaApp } from "backend"; // this line is what breaks everything
export const treaty = edenTreaty<ElysiaApp>("http://localhost:3001");
@chalabi2 did you find a fix for this
I started having this problem when I started using bun for testing and had to configure tsconfig with "types": ["bun-types"]
.
This is how I got around the problem:
"types": ["bun-types"]
from tsconfigbun remove bun-types
bun add -D @types/jest
This way I'm still using the bun test runner, but my project can still build because the bun test types are subset of jest.
What version of Bun is running?
1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49
What platform is your computer?
Darwin 22.4.0 arm64 arm
What steps can reproduce the bug?
Above is a basic handler for setting a constant to be the user input.
with
bun-types
installed it errors with,value does not exist on event
It works fine just throws a type error
What is the expected behavior?
It should have no error
What do you see instead?
It works fine just doesnt build without error
Additional information
No response