(
s: string | undefined,
)
| 2035 | ) |
| 2036 | |
| 2037 | const isValidStatus = ( |
| 2038 | s: string | undefined, |
| 2039 | ): s is 'completed' | 'failed' | 'stopped' | 'killed' => |
| 2040 | s === 'completed' || |
| 2041 | s === 'failed' || |
| 2042 | s === 'stopped' || |
| 2043 | s === 'killed' |
| 2044 | const rawStatus = statusMatch?.[1] |
| 2045 | const status = isValidStatus(rawStatus) |
| 2046 | ? rawStatus === 'killed' |