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

Allow --emitDeclarationOnly flag to be passed in --build #51164

Closed
5 tasks done
jakebailey opened this issue Oct 13, 2022 · 0 comments · Fixed by #51241
Closed
5 tasks done

Allow --emitDeclarationOnly flag to be passed in --build #51164

jakebailey opened this issue Oct 13, 2022 · 0 comments · Fixed by #51241
Assignees
Labels
Fix Available A PR has been opened for this issue

Comments

@jakebailey
Copy link
Member

Suggestion

🔍 Search Terms

emitDeclarationOnly build mode flag

✅ Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

This is split off of #25613 after some internal discussion; in --build, most flags are disabled, but it would be convenient to be able to specify --emitDeclarationOnly (true/false).

I'd like to be able to specify --emitDeclarationOnly=false in build mode for the module conversion, which lets us choose whether or not to emit JS or not (for continuous testing of a non-bundled mode); right now I'm using a hack that modifies the config before building and then restores it, which is error-prone when the build is canceled via Ctrl+C.

It's my understanding from our discussion that this flag should be doable, but not without a good bit of changes to what tsbuildinfo and such contain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Available A PR has been opened for this issue
Projects
None yet
4 participants