(runtime, options)
| 170 | SystemRotateCommandOptions, |
| 171 | SystemRotateCommandResult |
| 172 | > = async (runtime, options): Promise<SystemRotateCommandResult> => { |
| 173 | if (!runtime.backend.rotate) { |
| 174 | throw new AppError('UNSUPPORTED_OPERATION', 'system.rotate is not supported by this backend'); |
| 175 | } |
| 176 | const orientation = requireOrientation(options.orientation); |
| 177 | const backendResult = await runtime.backend.rotate( |
| 178 | toBackendContext(runtime, options), |
| 179 | orientation, |
| 180 | ); |
| 181 | const formattedBackendResult = toBackendResult(backendResult); |
| 182 | return { |
| 183 | kind: 'systemRotated', |
| 184 | orientation, |
| 185 | ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}), |
| 186 | ...successText(`Rotated to ${orientation}`), |
| 187 | }; |
| 188 | }; |
| 189 | |
| 190 | export const keyboardCommand: RuntimeCommand< |
| 191 | SystemKeyboardCommandOptions | undefined, |
nothing calls this directly
no test coverage detected