Skip to main content

CommandOptions

Extends: object

Generic options for the majority of screen reader operations.

For example, use when starting VoiceOver:

import { voiceOver } from "@guidepup/guidepup";

const startCommandOptions = {
capture: true,
retries: 3,
timeout: 10000,
};

(async () => {
// Start VoiceOver with custom output capture, timeout, and retries.
await voiceOver.start(commandOptions);
})();

Note: this configuration is used for each sub-operation of a command, they do not necessarily apply to the command as a whole.

See also:

Contents:

commandOptions.capture​

Optional: Whether to capture the screen reader output:

  • "initial" will capture the first "page" of output, but not any subsequent content.
  • true will enabled full capture.
  • false will disable capture.

Default is "initial".

Type: "initial" | boolean

commandOptions.retries​

Optional: Number of times to retry.

Default is 1 for mutable commands and 3 otherwise.

Type: number

commandOptions.timeout​

Optional: How long to wait until the command times out in ms.

Default is 30000 for startup and shutdown commands and 5000 otherwise.

Type: number