(reason: string)
| 744 | // root. Multiple registered → ambiguous, so we still return null and let |
| 745 | // the loud warning fire. |
| 746 | const resolveSoleTimelineFallback = (reason: string): TimelineResolution => { |
| 747 | const usable = Object.entries(timelines).filter( |
| 748 | (entry): entry is [string, RuntimeTimelineLike] => |
| 749 | !!entry[1] && typeof entry[1].play === "function" && typeof entry[1].pause === "function", |
| 750 | ); |
| 751 | if (usable.length !== 1) return { timeline: null }; |
| 752 | const [soleId, soleTimeline] = usable[0]; |
| 753 | return { |
| 754 | timeline: soleTimeline, |
| 755 | selectedTimelineIds: [soleId], |
| 756 | selectedDurationSeconds: getTimelineDurationSeconds(soleTimeline), |
| 757 | diagnostics: { |
| 758 | code: "root_timeline_sole_registered_fallback", |
| 759 | details: { reason, soleTimelineId: soleId }, |
| 760 | }, |
| 761 | }; |
| 762 | }; |
| 763 | const startResolver = createRuntimeStartTimeResolver({ |
| 764 | timelineRegistry: timelines, |
| 765 | includeAuthoredTimingAttrs: true, |
no test coverage detected