You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Suggestion] should Overloads not differ only by return type? #11281
The first option is expensive (O(n^2) and we have large n in many places) and for the sake of checking code that is very rarely wrong. The second option is hard to explain, still expensive, and ends up confusing people because sometimes they get an error and sometimes they don't. The third is undesirable for obvious reasons, but is at least "free" in certain sense of the word and can be mostly covered with TSLint rules in places where there's some danger of getting it wrong.
Activity
dead-claudia commentedon Dec 13, 2016
TS is at 2.1 now...I'd advise checking it out. It's got some pretty cool features. 😉
RyanCavanaugh commentedon Jan 24, 2017
Three options on the table:
The first option is expensive (
O(n^2)and we have largenin many places) and for the sake of checking code that is very rarely wrong. The second option is hard to explain, still expensive, and ends up confusing people because sometimes they get an error and sometimes they don't. The third is undesirable for obvious reasons, but is at least "free" in certain sense of the word and can be mostly covered with TSLint rules in places where there's some danger of getting it wrong.HerringtonDarkholme commentedon Jan 24, 2017
Thanks for your explanation!