Open sebastianbuechler opened 1 week ago
I don't believe the behavior you're seeing is because of Bun, rather the Typescript LSP.
You need to tell the TS LSP to look in the workspace root for types when working in the packages/ directory. To accomplish this you can either:
include: ["."]
or by modifying the compilerOptions.typeRoots
field and then add "extends": "../tsconfig.json"
to packages/tsconfig.json
packages/tsconfig.json
only to have it include types from ../
again with the include
or compilerOptions.typeRoots
fields
What version of Bun is running?
1.1.34+5e5e7c60f
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
./packages/dom.test.tsx
What is the expected behavior?
No typescript error in
./packages/dom.test.tsx
as it is in the same file placed in the root./dom.test.tsx
.What do you see instead?
Line 9 ('.
expect(myComponent).toBeInTheDocument();
) shows a typescript error: Property 'toBeInTheDocument' does not exist on type 'MatchersAdditional information
Is it probably just a configuration issue of workspaces?