(fn: () => A)
| 1748 | } |
| 1749 | |
| 1750 | export function deferredUpdates<A>(fn: () => A): A { |
| 1751 | const prevTransition = ReactSharedInternals.T; |
| 1752 | const previousPriority = getCurrentUpdatePriority(); |
| 1753 | try { |
| 1754 | setCurrentUpdatePriority(DefaultEventPriority); |
| 1755 | ReactSharedInternals.T = null; |
| 1756 | return fn(); |
| 1757 | } finally { |
| 1758 | setCurrentUpdatePriority(previousPriority); |
| 1759 | ReactSharedInternals.T = prevTransition; |
| 1760 | } |
| 1761 | } |
| 1762 | |
| 1763 | export function batchedUpdates<A, R>(fn: A => R, a: A): R { |
| 1764 | if (disableLegacyMode) { |
nothing calls this directly
no test coverage detected