Skip to content
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

TypeScript types can't be parsed properly after install #1

Closed
sjdemartini opened this issue Jan 6, 2023 · 3 comments · Fixed by #2
Closed

TypeScript types can't be parsed properly after install #1

sjdemartini opened this issue Jan 6, 2023 · 3 comments · Fixed by #2
Assignees
Labels
bug Something isn't working

Comments

@sjdemartini
Copy link

Excited to come across this package, thanks for building it! (I was using the equivalent in Jest before, and had to remove it when switching to vitest).


I've installed this package and it seems to run properly, but in my editor (VSCode) and when running tsc --no-edmit, I get errors for the line that imports this package:

ERROR(TypeScript)  Cannot find module 'vitest-fail-on-console' or its corresponding type declarations.

pointing to the line:

import failOnConsole from "vitest-fail-on-console";

I'm using yarn, TS 4.9, and have installed this package via "vitest-fail-on-console": "^0.2.0", in my package.json.

@thomasbrodusch
Copy link
Owner

thomasbrodusch commented Jan 9, 2023

Hi, @sjdemartini thank you for using vitest-fail-on-console, your precious feedback, and this first issue 🥳
After some investigations, I can tell you that I can reproduce that issue.

The error thrown by tsc --noEmit occurs due to a TypeScript type definition file name mismatch (it cannot find it).
That being said, I'll push a PR during the day to fix it.

@thomasbrodusch thomasbrodusch added the bug Something isn't working label Jan 9, 2023
@thomasbrodusch thomasbrodusch self-assigned this Jan 9, 2023
thomasbrodusch added a commit that referenced this issue Jan 9, 2023
thomasbrodusch added a commit that referenced this issue Jan 9, 2023
* move index.d.ts to dist/index.d.ts
@thomasbrodusch
Copy link
Owner

@sjdemartini fixed by 28a61de
v0.2.3 Deployed on NPM 🚀

@sjdemartini
Copy link
Author

Perfect, it's working for me now! Thank you for the quick response and quick fix! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants