(time: string)
| 110 | * @returns parses the string and returns an integer |
| 111 | */ |
| 112 | export function parseServerTimeout(time: string) { |
| 113 | // The argument 10 implies to convert the given string to base-10(decimal) |
| 114 | const timeValue = parseInt(time, 10); |
| 115 | if (isNaN(timeValue)) { |
| 116 | logger.error(`--devserver-timeout should be a number expressed in seconds. Got "${time}".`, true); |
| 117 | } else if (timeValue < 0) { |
| 118 | logger.error(`--devserver-timeout should be a positive number`); |
| 119 | } |
| 120 | return timeValue; |
| 121 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…