Skip to content

Watch generated file if it doesnt exist when trying to translate it to to source generated position#32147

Merged
sheetalkamat merged 2 commits into
masterfrom
noDtsWhenNotUsingProjectReferences
Jul 1, 2019
Merged

Watch generated file if it doesnt exist when trying to translate it to to source generated position#32147
sheetalkamat merged 2 commits into
masterfrom
noDtsWhenNotUsingProjectReferences

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

This fixes issue with d.ts files generated after project creation to be picked up.

Comment thread src/server/project.ts

/* @internal */
addGeneratedFileWatch(generatedFile: string, sourceFile: string) {
if (this.compilerOptions.outFile || this.compilerOptions.out) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really understanding the connection between outFile/out and the single watcher vs. multi watcher scenario. Can you give me a little background?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If options specify outFile or out there is going to be single generated file for all source files in the program. Otherwise 1:1 mapping between source and generated files

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was definitely reading this as outFile/outDir in my head, and was confused how it could apply to outDir—and the answer is it doesn’t. Makes sense now, thanks 🤦‍♂

Comment thread src/server/project.ts Outdated
Co-Authored-By: Orta <orta.therox+github@gmail.com>
@sheetalkamat sheetalkamat merged commit f6d7261 into master Jul 1, 2019
@sheetalkamat sheetalkamat deleted the noDtsWhenNotUsingProjectReferences branch July 1, 2019 17:22
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants