The sleep type to prevent. One of: "display" (prevent display idle sleep), "systemIdle" (prevent system idle sleep), "system" (prevent all system sleep, including from power button or lid close).
true if the assertion was created successfully.
Prevents the specified type of system sleep.
Creates an IOKit power assertion that stops macOS from allowing the specified type of sleep. Call
allowSleepwith the same type to release the assertion.