I think this should help resolve our issues of getting inconsistent .d.ts files with /// <reference .... We originally added this logic to just the yarn 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.
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.