Interface OnWillStopAction<T>

interface OnWillStopAction<T> {
    action: ((prepared, stopReason?) => MaybePromise<boolean>);
    prepare?: ((stopReason?) => MaybePromise<T>);
    priority?: number;
    reason: string;
}

Type Parameters

  • T = unknown

Properties

action: ((prepared, stopReason?) => MaybePromise<boolean>)

Type declaration

Resolves

to true if it is safe to close the application; false otherwise.

prepare?: ((stopReason?) => MaybePromise<T>)

Type declaration

Resolves

to a prepared value to be passed into the action function.

priority?: number

A number representing priority. Higher priority items are run later. High priority implies that some options of this check will have negative impacts if the user subsequently cancels the shutdown.

reason: string

A descriptive string for the reason preventing close.