| 203 | }; |
| 204 | |
| 205 | export class Interrupt { |
| 206 | [INTERRUPT_KEY]: z.infer<typeof interruptSchema>; |
| 207 | |
| 208 | constructor( |
| 209 | type: VALID_INTERRUPT_TYPES, |
| 210 | notification?: z.infer<typeof interruptSchema>["notification"], |
| 211 | ) { |
| 212 | this[INTERRUPT_KEY] = { |
| 213 | type, |
| 214 | notification, |
| 215 | }; |
| 216 | } |
| 217 | |
| 218 | static approval( |
| 219 | notification?: z.infer<typeof interruptSchema>["notification"], |
| 220 | ) { |
| 221 | return new Interrupt("approval", notification); |
| 222 | } |
| 223 | |
| 224 | static general( |
| 225 | notification?: z.infer<typeof interruptSchema>["notification"], |
| 226 | ) { |
| 227 | return new Interrupt("general", notification); |
| 228 | } |
| 229 | } |
nothing calls this directly
no outgoing calls
no test coverage detected