1// @needsAudit
2export type KeepAwakeEvent = {
3  /** Keep awake state. */
4  state: KeepAwakeEventState;
5};
6
7// @needsAudit
8export enum KeepAwakeEventState {
9  RELEASE = 'release',
10}
11
12// @needsAudit
13export type KeepAwakeListener = (event: KeepAwakeEvent) => void;
14
15export type KeepAwakeOptions = {
16  /**
17   * The call will throw an unhandled promise rejection on Android when the original Activity is dead or deactivated.
18   * Set the value to `true` for suppressing the uncaught exception.
19   */
20  suppressDeactivateWarnings?: boolean;
21
22  /**
23   * A callback that is invoked when the keep-awake state changes.
24   * @platform web
25   */
26  listener?: KeepAwakeListener;
27};
28