Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise.
(inputValue: T, selection?: Set<T>)
| 260 | |
| 261 | /** Returns a value that is comparable to inputValue by applying compareWith function, returns the same inputValue otherwise. */ |
| 262 | private _getConcreteValue(inputValue: T, selection?: Set<T>): T { |
| 263 | if (!this.compareWith) { |
| 264 | return inputValue; |
| 265 | } else { |
| 266 | selection = selection ?? this._selection; |
| 267 | for (let selectedValue of selection) { |
| 268 | if (this.compareWith!(inputValue, selectedValue)) { |
| 269 | return selectedValue; |
| 270 | } |
| 271 | } |
| 272 | return inputValue; |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | /** |
no outgoing calls
no test coverage detected