( priorityLevel: PriorityLevel, callback: () => T, )
| 179 | } |
| 180 | |
| 181 | export function unstable_runWithPriority<T>( |
| 182 | priorityLevel: PriorityLevel, |
| 183 | callback: () => T, |
| 184 | ): T { |
| 185 | const previousPriorityLevel = currentPriorityLevel_DEPRECATED; |
| 186 | currentPriorityLevel_DEPRECATED = priorityLevel; |
| 187 | try { |
| 188 | return callback(); |
| 189 | } finally { |
| 190 | currentPriorityLevel_DEPRECATED = previousPriorityLevel; |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | export function unstable_getCurrentPriorityLevel(): PriorityLevel { |
| 195 | return currentPriorityLevel_DEPRECATED; |
nothing calls this directly
no test coverage detected