Asserts that a selector parameter is valid, i.e., a function or a string.
The type of the input items.
The type of the selected value.
The selector to validate.
Optional
The name to use in error messages.
If the selector is neither a function nor a string.
Used internally by resolveSelector to provide clearer type safety and errors.
resolveSelector
Asserts that a selector parameter is valid, i.e., a function or a string.