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
Item 52: Prefer Conditional Types to Overload Signatures
Things to Remember
Prefer conditional types to overloaded type signatures. By distributing over unions, conditional types allow your declarations to support union types without additional overloads.
If the union case is implausible, consider whether your function would be clearer as two or more functions with different names.
Consider using the single overload strategy for implementing functions declared with conditional types.