I'm working with a map function and the parameter type is an array of strings or numbers. I've defined it as:
(param: (string | number)[]) => ...
However, I want to simplify it to:
(param: StringOrNumber)[]) => ...
Having to repeat the type declaration multiple times in different functions is reducing readability. Is there a built-in way in Typescript to simplify this, or do I need to create a custom type?