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