TypeScript (and JavaScript) functions can only return one value, but that value can be an object. To return multiple values from a function, we can return those in an object. There are two ways of returning an object from a TypeScript function: Create an object in the function, set the property values and return it …
Continue reading “How to return multiple values from a TypeScript function”