Thanks for sharing the index signature issue. I was not aware of it!
I have ran performance benchmark for 10k intersect vs 10k interface extend. Results
Interface extend: 1 min 26 sec 629 ms
Type intersect: 2 min 33 sec 117 ms
10k intersections can be possible in a fairly large project. Types take around a minute more to compile. This cost is generally incurred in CI pipelines and not during development. For development cases only concerned types per file are resolved, which should remain instantaneous in most cases.
A few minutes of additional compile time in CI, in more heavy weight cases, is a good trade off to avoid all the gotchas associated with interface.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for sharing the index signature issue. I was not aware of it!
I have ran performance benchmark for 10k intersect vs 10k interface extend. Results
10k intersections can be possible in a fairly large project. Types take around a minute more to compile. This cost is generally incurred in CI pipelines and not during development. For development cases only concerned types per file are resolved, which should remain instantaneous in most cases.
A few minutes of additional compile time in CI, in more heavy weight cases, is a good trade off to avoid all the gotchas associated with interface.