// If a function is dealing with multi returns with diffirent types
// then you are forced to specify the type.
// In adddition, if inside the function you have empty `return`s
// then you must give them value for example `undefined`
// ES6 function. exmaple returning string or number:
const functionName = (): string | number => {
// ... code ...
}
// ES5 function. example returning string or number
function functionName(): string | number {
// ... code ...
}