feat(types): add type for the onAbort Reporter method

This commit is contained in:
Joakim Carlstein 2024-01-22 10:16:35 +01:00 committed by Joakim Carlstein
parent 576dfbb124
commit ce15648251
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'@emigrate/types': minor
---
Add type for onAbort Reporter method

View file

@ -243,6 +243,14 @@ export type EmigrateReporter = Partial<{
* Called when the reporter is initialized, which is the first method that is called when a command is executed.
*/
onInit(parameters: ReporterInitParameters): Awaitable<void>;
/**
* Called when the current command (in practice the "up" command) is aborted.
*
* This is called when the process is interrupted, e.g. by a SIGTERM or SIGINT signal, or an unhandled error occurs.
*
* @param reason The reason why the command was aborted.
*/
onAbort(reason: Error): Awaitable<void>;
/**
* Called when all pending migrations that should be executed have been collected.
*