Skip to content

Why --emitDeclarationOnly in TypeScript plugin? #684

Answered by paularmstrong
alecmev asked this question in Q&A
Discussion options

You must be logged in to vote

Why does it deviate from the non-project-references branch, which uses --noEmit? This breaks for me because my root-level tsconfig.json has noEmit in it, and these two options are incompatible with each other.

project references require declarations to benefit from using the references/ts cache, but the declaration does nothing in the other branch.

In general, why are these options forced at all? At first glance, it doesn't seem dangerous to emit, if desired, and if not, it's as easy as putting noEmit in a base config.

Emit is unnecessary when using source dependencies

--build can probably be an independent option too, no?

Related discussion: #666

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alecmev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants