-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 tsc --build --noEmit
#53979
Comments
|
Note that referenced projects were not allowed to specify |
I encountered this problem as well recently. You can specify noEmit: true in the tsconfig.js, but you can't pass it via the command-line. Support for |
I got here because I am attempting to run I find that
|
We are handling a sizable project where approximately 30% of the time is spent on transform and emit tasks. This duration could be decreased if this functionality is incorporated.
|
Type checking is currently not evaluated for referenced files. In order to make it evaluate, we have to use `--build`. However, this cannot be used with `--noEmit` and so will emit compiled files unless we use the solution tsconfig pattern. See - microsoft/TypeScript#53979 - vitejs/vite#15913 See also - https://www.typescriptlang.org/docs/handbook/project-references.html#overall-structure - vitejs/vite#17774
Type checking is currently not evaluated for referenced files. In order to make it evaluate, we have to use `--build`. However, this cannot be used with `--noEmit` and so will emit compiled files unless we use the solution tsconfig pattern. See - microsoft/TypeScript#53979 - vitejs/vite#15913 See also - https://www.typescriptlang.org/docs/handbook/project-references.html#overall-structure - vitejs/vite#17774
I am equally finding a need for this option. I am working on a large codebase with project references, and I am having issues related to this. We have had refactors that cause typechecking issues due to old dist files being left behind. This could be solved with |
We're looking for something similar but for type checking a single composite project without generating any output (maybe except for |
Suggestion
π Search Terms
tsc --build --noEmit
build noEmit
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Allow
tsc --build --noEmit
, the relevant types can be emitted to thetsbuildinfo
for incremental building. This is very useful to allow type checking only for projects using project references and working with a bundler. e.g. Acreate-vue
project, which currently has to resort to hackery such asvue-tsc --noEmit -p tsconfig.vitest.json --composite false
which is not as accurate as type checking each project individually.π Motivating Example
tsc --build --noEmit
is now supported, allowing to only run type checking for projects using project references that don't also build types usingtsc
.π» Use Cases
Type checking only, for projects using other build tools than
tsc
but still using project references for each of configuration.The text was updated successfully, but these errors were encountered: