typescript
type ShutdownReason = { code: number | null; signal: string | null; type: "exit" } | { error: Error; type: "error" } | { type: "close" }type ShutdownReason = { code: number | null; signal: string | null; type: "exit" } | { error: Error; type: "error" } | { type: "close" }