(arr: Array<number>)
| 258 | } |
| 259 | |
| 260 | function checkValidInputRange(arr: Array<number>) { |
| 261 | invariant(arr.length >= 2, 'inputRange must have at least 2 elements'); |
| 262 | for (var i = 1; i < arr.length; ++i) { |
| 263 | invariant( |
| 264 | arr[i] >= arr[i - 1], |
| 265 | /* $FlowFixMe(>=0.13.0) - In the addition expression below this comment, |
| 266 | * one or both of the operands may be something that doesn't cleanly |
| 267 | * convert to a string, like undefined, null, and object, etc. If you really |
| 268 | * mean this implicit string conversion, you can do something like |
| 269 | * String(myThing) |
| 270 | */ |
| 271 | 'inputRange must be monotonically increasing ' + arr |
| 272 | ); |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | function checkInfiniteRange(name: string, arr: Array<number>) { |
| 277 | invariant(arr.length >= 2, name + ' must have at least 2 elements'); |
no outgoing calls
no test coverage detected
searching dependent graphs…