()
| 31 | * calls these inside drainRunLoop(). |
| 32 | */ |
| 33 | export function requireComputerUseInput(): ComputerUseInputAPI { |
| 34 | if (cached) return cached |
| 35 | // eslint-disable-next-line @typescript-eslint/no-require-imports |
| 36 | const input = unwrapDefaultExport( |
| 37 | require('@ant/computer-use-input') as ComputerUseInput | { |
| 38 | default: ComputerUseInput |
| 39 | }, |
| 40 | ) |
| 41 | if (!input.isSupported) { |
| 42 | throw new Error('@ant/computer-use-input is not supported on this platform') |
| 43 | } |
| 44 | return (cached = input) |
| 45 | } |
no test coverage detected