-
Notifications
You must be signed in to change notification settings - Fork 454
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
Emit declaration files for composite projects #1159
Comments
Hi, would you please explain clearly what is the issue/error you encountered and a repo to reproduce your issue ? |
This is really more a feature request than a bug report. Problem is that it's often useful for another tooling (like an editor) to have types written to disk (especially when working in a monorepo), so it would be good (in my opinion) to have declaration files being generated while type-checking with |
does emit declaration file depend on |
Hm, not completely sure. Type-checking relies on it for sure, declaration files alone are not options-specific anyhow (I think?) so it actually could not rely on it. If my reasoning is correct then only options related to disk location are relevant - so to answer the question: yes, a little bit. |
how do you want |
They are not, as you are using JS API for TypeScript this kind of thing would have to be implemented in |
I will close this in favor of #1336 |
@Andarist I think I might have an idea how to tackle this issue. Just to understand you correctly: your request is while running tests with ts-jest, you want to have at the same time type declaration files are written on disk, similar to running tsc before running tests |
@ahnpnl yes, exactly that. This would allow for not having to generate type declarations in a separate watch process and they are useful for other tools (such as VScode when dealing with project references) |
thanks for confirmation 👍 , I would say this feature request should be applicable for both monorepo and non-monorepo. |
Issue
Seems to me that the easiest thing one can do is run one tool at a time. So ideally I'd like to run only jest and have my monorepo just reference itself (its modules) when needed. I fail though when it comes to type checking (done within ts-jest), because composite packages needs packages on which they depend built to disk - otherwise they can't load them.
IMHO it would be nice to support this as it could work kinda out of the box then for the user. Having to run both tsc and jest at the same time feels kinda counter-productive.
The text was updated successfully, but these errors were encountered: