( record: Record<string, unknown>, options: CommonInputOptions, )
| 301 | } |
| 302 | |
| 303 | function readDeviceTarget( |
| 304 | record: Record<string, unknown>, |
| 305 | options: CommonInputOptions, |
| 306 | ): DeviceTarget | undefined { |
| 307 | const deviceTarget = optionalEnum(record, 'deviceTarget', DEVICE_TARGETS); |
| 308 | if (options.readTargetAlias === false || record.target === undefined) return deviceTarget; |
| 309 | const targetAlias = optionalEnum(record, 'target', DEVICE_TARGETS); |
| 310 | if (deviceTarget !== undefined && targetAlias !== deviceTarget) { |
| 311 | throw new Error('Expected target alias to match deviceTarget when both are set.'); |
| 312 | } |
| 313 | return deviceTarget ?? targetAlias; |
| 314 | } |
| 315 | |
| 316 | function readInteractionTarget( |
| 317 | record: Record<string, unknown>, |
no test coverage detected
searching dependent graphs…