DEV Community

Discussion on: The Power of Flexible Types in TypeScript

Collapse
 
stagefright5 profile image
stagefright5

I could not understand the overload example.
I'm confused that there is only one implementation of "fetchData". Also, what is the need to define the function twice? Can't we just write the implementation part and call that function with different types of data?