Namespace: Power#
Main.Power
Table of contents#
Type Aliases#
Functions#
Type Aliases#
PowerEventListener#
Ƭ PowerEventListener: () => void
Type declaration#
▸ (): void
Event listener for system power events
Returns#
void
Functions#
onResume#
▸ onResume(listener
): Disposer
Adds event listener to system resume event
Parameters#
Name | Type | Description |
---|---|---|
listener |
PowerEventListener |
function which will be called on system resume |
Returns#
Disposer
function to remove event listener
onShutdown#
▸ onShutdown(listener
): Disposer
Adds event listener to the event which is emitted when the system is about to reboot or shut down
Parameters#
Name | Type | Description |
---|---|---|
listener |
PowerEventListener |
function which will be called on system shutdown |
Returns#
Disposer
function to remove event listener
onSuspend#
▸ onSuspend(listener
): Disposer
Adds event listener to system suspend events
Parameters#
Name | Type | Description |
---|---|---|
listener |
PowerEventListener |
function which will be called on system suspend |
Returns#
Disposer
function to remove event listener