(lanes: Lanes)
| 53 | } |
| 54 | |
| 55 | export function lanesToEventPriority(lanes: Lanes): EventPriority { |
| 56 | const lane = getHighestPriorityLane(lanes); |
| 57 | if (!isHigherEventPriority(DiscreteEventPriority, lane)) { |
| 58 | return DiscreteEventPriority; |
| 59 | } |
| 60 | if (!isHigherEventPriority(ContinuousEventPriority, lane)) { |
| 61 | return ContinuousEventPriority; |
| 62 | } |
| 63 | if (includesNonIdleWork(lane)) { |
| 64 | return DefaultEventPriority; |
| 65 | } |
| 66 | return IdleEventPriority; |
| 67 | } |
no test coverage detected