( fn: (A, B, C, D) => R, a: A, b: B, c: C, d: D, )
| 1787 | } |
| 1788 | |
| 1789 | export function discreteUpdates<A, B, C, D, R>( |
| 1790 | fn: (A, B, C, D) => R, |
| 1791 | a: A, |
| 1792 | b: B, |
| 1793 | c: C, |
| 1794 | d: D, |
| 1795 | ): R { |
| 1796 | const prevTransition = ReactSharedInternals.T; |
| 1797 | const previousPriority = getCurrentUpdatePriority(); |
| 1798 | try { |
| 1799 | setCurrentUpdatePriority(DiscreteEventPriority); |
| 1800 | ReactSharedInternals.T = null; |
| 1801 | return fn(a, b, c, d); |
| 1802 | } finally { |
| 1803 | setCurrentUpdatePriority(previousPriority); |
| 1804 | ReactSharedInternals.T = prevTransition; |
| 1805 | if (executionContext === NoContext) { |
| 1806 | resetRenderTimer(); |
| 1807 | } |
| 1808 | } |
| 1809 | } |
| 1810 | |
| 1811 | // Overload the definition to the two valid signatures. |
| 1812 | // Warning, this opts-out of checking the function body. |
nothing calls this directly
no test coverage detected