Ensures that there is not an invalid configuration for the slider thumb inputs.
( isRange: boolean, endInputElement: _MatSliderThumb | _MatSliderRangeThumb | undefined, startInputElement: _MatSliderThumb | undefined, )
| 947 | |
| 948 | /** Ensures that there is not an invalid configuration for the slider thumb inputs. */ |
| 949 | function _validateInputs( |
| 950 | isRange: boolean, |
| 951 | endInputElement: _MatSliderThumb | _MatSliderRangeThumb | undefined, |
| 952 | startInputElement: _MatSliderThumb | undefined, |
| 953 | ): void { |
| 954 | const startValid = |
| 955 | !isRange || startInputElement?._hostElement.hasAttribute('matSliderStartThumb'); |
| 956 | const endValid = endInputElement?._hostElement.hasAttribute( |
| 957 | isRange ? 'matSliderEndThumb' : 'matSliderThumb', |
| 958 | ); |
| 959 | |
| 960 | if (!startValid || !endValid) { |
| 961 | _throwInvalidInputConfigurationError(); |
| 962 | } |
| 963 | } |
| 964 | |
| 965 | function _throwInvalidInputConfigurationError(): void { |
| 966 | throw Error(`Invalid slider thumb input configuration! |
no test coverage detected