Function overloading with a variable number of arguments.
Let’s assume we need to write a function in TypeScript that adds samples to some kind of store. Additionally, we want to be able to pass a single sample, several samples or an array of samples to that function. That…