(state: ToolDict)
| 189 | } |
| 190 | |
| 191 | function span(state: ToolDict): string { |
| 192 | const time = dict(state.time) |
| 193 | const start = num(time.start) |
| 194 | const end = num(time.end) |
| 195 | if (start === undefined || end === undefined || end <= start) { |
| 196 | return "" |
| 197 | } |
| 198 | |
| 199 | return Locale.duration(end - start) |
| 200 | } |
| 201 | |
| 202 | function fail(ctx: ToolFrame): string { |
| 203 | const error = toolError(ctx) |
no test coverage detected