Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

tsconfig.vite.ts should include only the test files#151

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
segevfiner wants to merge1 commit intovuejs:mainfromsegevfiner:patch-1

Conversation

segevfiner
Copy link

Otherwise node and jsdom types are available in ts and vue files. Whoops.

Otherwise node and jsdom types are available in ts and vue files. Whoops.
@segevfiner
Copy link
Author

segevfiner commentedSep 1, 2022
edited
Loading

Oh wait. This will cause the default type-check command to only check the types of the test files. We will have to modify that as well. But I'm not sure how. As they don't supporttsc --build --noEmit.

@segevfinersegevfiner marked this pull request as draftSeptember 1, 2022 13:37
@segevfiner
Copy link
Author

segevfiner commentedSep 4, 2022
edited
Loading

Argh. There is a bit of a problem here. Type checking with just usingtsconfig.vite.json won't work as the test files include the app's code, &tsc/vue-tsc --build --noEmit is not supported, as that mode relies on .d.ts output files to compile each project separately and type check them agains't each other. This might mean we will need to not usenoEmit and usedeclarationDir/outDir/emitDeclarationOnly to some dedicated directory to run type checking.

Opinions anyone?@sodatea@cexbrayat

@segevfiner
Copy link
Author

I tried swapping the order oftsconfig.app.json &tsconfig.vitest.json intsconfig.json and VS Code decided to usetsconfig.app.json instead. 🤷‍♂️ I still wonder if that's a proper fix or if there is a way to do this properly. e.g. Some variant oftsc --build that does work for only type checking maybe by emitting temporary .d.ts file to some .gitignored folder.

@segevfiner
Copy link
Author

Oh great. The resolution order is flipped between Volar and the builtin tsserver. Volar will prefer the first matching tsconfig, and tsserver the last!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@segevfiner

[8]ページ先頭

©2009-2025 Movatter.jp