If I have a function that takes any type and returns it, how can I ensure the function won't accept an array type? I want to accept all types except arrays.
function someFunc<T>(arg: T): T { return arg; }
This should be valid:
someFunc('string');
But this should fail:
someFunc(['string', 'string2']);
Is it possible?