This repository was archived by the owner on May 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,23 +23,23 @@ export class Exit {
2323 /**
2424 * Stop the action with a "success" status
2525 */
26- public success ( message ?: string ) {
26+ public success ( message ?: string ) : never {
2727 if ( message ) this . logger . success ( message )
2828 process . exit ( SuccessCode )
2929 }
3030
3131 /**
3232 * Stop the action with a "neutral" status
3333 */
34- public neutral ( message ?: string ) {
34+ public neutral ( message ?: string ) : never {
3535 if ( message ) this . logger . info ( message )
3636 process . exit ( NeutralCode )
3737 }
3838
3939 /**
4040 * Stop the action with a "failed" status
4141 */
42- public failure ( message ?: string ) {
42+ public failure ( message ?: string ) : never {
4343 if ( message ) this . logger . fatal ( message )
4444 process . exit ( FailureCode )
4545 }
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ describe('Toolkit', () => {
3737
3838 it ( 'logs and fails when the function throws an error' , async ( ) => {
3939 const err = new Error ( 'Whoops!' )
40- const exitFailure = jest . fn ( )
40+ const exitFailure = jest . fn < never , any > ( )
4141
4242 await Toolkit . run ( async twolkit => {
4343 twolkit . exit . failure = exitFailure
You can’t perform that action at this time.
0 commit comments