appProcess.current.requestClose

API reference for the appProcess.current.requestClose method.

Requests the termination of the current process.

Once called, this method:

  1. Transitions the state of the process to "closing".
  2. Invokes all registered setOnDispose callbacks.
  3. Waits for the process to finish closing.
  4. Transitions the state of the process to "closed".

Each time the state changes, all of the registerOnStateChange callbacks are called.

#paramsT
Required

Parameters to pass to the setOnDispose callback. Any structured data can be passed via this property.

Properties of params
#reasonCloseReason
Required

The reason the app process is closing.

The available options include:

  • "completed"
  • "aborted"

Promise<void>