(record: Record<string, unknown>, key: string)
| 338 | } |
| 339 | |
| 340 | function readElementTarget(record: Record<string, unknown>, key: string): ElementTargetInput { |
| 341 | const target = readRecordField(record, key); |
| 342 | const kind = requiredEnum(target, 'kind', ['ref', 'selector'] as const); |
| 343 | if (kind === 'ref') { |
| 344 | return { |
| 345 | kind, |
| 346 | ref: requiredString(target, 'ref'), |
| 347 | label: optionalString(target, 'label'), |
| 348 | }; |
| 349 | } |
| 350 | return { kind, selector: requiredString(target, 'selector') }; |
| 351 | } |
| 352 | |
| 353 | export function readPoint(record: Record<string, unknown>, key: string): PointInput { |
| 354 | const point = readRecordField(record, key); |
no test coverage detected
searching dependent graphs…