fix(npm-scripts): wipe the tsbuildinfo file to ensure consistent types #1143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this should help resolve our issues of getting inconsistent .d.ts files with
/// <reference ...
. We originally added this logic to just theyarn types
command and it helped out quite a bit, but now we also need it on individual module builds, so I am removing the file everytime we run runTsc.I can't totally figure out why we are getting odd behavior with those references in d.ts files, but I suspect it may be
a bug in our TS version. I ran some tests with TS on the latest version and I wasn't able to reproduce this issue,
although it brought other issues.
Now I'm not totally stoked with this because this may increase our build time a little bit, although not significantly
because we have our own npm-scripts cacheing mechanism. So I think we stick with this for now and then investigate
upgrading to TS 5 later.