HackerTrans
TopNewTrendsCommentsPastAskShowJobs

klankeser

no profile record

comments

klankeser
·anno scorso·discuss
I would recommend reading the article example once more. Going from the example, without the overload, the function would return a union type which means any time you use the function, you have to put a type check to the result to know if the output is a list or not. With overload, as soon as an argument to the function is a certain type, the output is determined, so you won't need to type check.