-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Support solution style tsconfig.json
files
#2612
Comments
This is because the |
Ah, sorry, this part seems to be because of that.
The error below still happens with it.
|
From my understanding composite is required in project reference. Though yeah, it is mostly related to how |
I've also been wrestling with some errors around "solutions-style" If I update the If I instead point
then I get the errors I would expect to see! |
@alexlafroscia. Yes, this is the intended behaviour. In svelte-check, there is no check for project assignments; it's the opposite. You pass in the config path, and svelte-check loads the file included with the config. |
It is not always required (microsoft/TypeScript#60465).
The error is coming from TypeScript, but it doesn't happen when the Svelte extension is not enabled. Isn't the extension interacting with TypeScript somehow and making the error here? |
@jasonlyu123 can you elaborate on what this means?
I would expect that the |
svelte-check behaves like |
@jasonlyu123 just to understand the implications of this
Does that mean that only the passed-in config file is used at all? Say, as an example, I want my test files to be treated with a "looser" configuration than my source files. The two ways I know of for approaching this kind of set-up are:
Since the first option doesn't seem supported by This article does a good job of explaining the problems I am trying to solve for my application; I'm just trying to determine if there's some way for |
For TypeScript, each tsconfig is its own project. The solution project is no exception. i.e. The files in the referenced project don't belong to the solution project. In This doesn't mean you can't use project references or a solution project but you currently have to run svelte-check with the exact tsconfig. For example, svelte-check --tsconfig tsconfig.client.json && svelte-check --tsconfig tsconfig.test.json If we were to add a flag similar to |
I see -- Thank you @jasonlyu123! I definitely has some misconceptions about how multiple |
Description
solution style
tsconfig.json
files allows to apply different typescript settings to different directories. #2463 added support for project references, but it seems it doesn't work with solution styletsconfig.json
files.Proposed solution
Support solution style
tsconfig.json
filesAlternatives
No response
Additional Information, eg. Screenshots
Reproduction
vite.config.ts
tsconfig.json
Referenced project 'tsconfig.app.json' must have setting "composite": true.
,Referenced project 'tsconfig.app.json' may not disable emit.
) happeningvite.config.ts
tsconfig.json
1.-3.
(same with above)4.
Opensrc/App.svelte
5.
SeeCannot find module './assets/svelte.svg' or its corresponding type declarations.
shown (I guesstsconfig.app.json
is not used)System Info
VSCode Information
Version: 1.95.3
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.95.3 Chrome/128.0.6613.186 Electron/32.2.1 Safari/537.36
Svelte Extension
v109.3.2
The text was updated successfully, but these errors were encountered: