UNPKG

4.25 kBJavaScriptView Raw
1/**
2 * @license React
3 *
4 * Copyright (c) Facebook, Inc. and its affiliates.
5 *
6 * This source code is licensed under the MIT license found in the
7 * LICENSE file in the root directory of this source tree.
8 */
9
10/* eslint-disable max-len */
11
12'use strict';
13
14(function(global, factory) {
15 // eslint-disable-next-line no-unused-expressions
16 typeof exports === 'object' && typeof module !== 'undefined'
17 ? (module.exports = factory(require('react')))
18 : typeof define === 'function' && define.amd // eslint-disable-line no-undef
19 ? define(['react'], factory) // eslint-disable-line no-undef
20 : (global.Scheduler = factory(global));
21})(this, function(global) {
22 function unstable_now() {
23 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
24 this,
25 arguments
26 );
27 }
28
29 function unstable_scheduleCallback() {
30 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
31 this,
32 arguments
33 );
34 }
35
36 function unstable_cancelCallback() {
37 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
38 this,
39 arguments
40 );
41 }
42
43 function unstable_shouldYield() {
44 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
45 this,
46 arguments
47 );
48 }
49
50 function unstable_runWithPriority() {
51 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
52 this,
53 arguments
54 );
55 }
56
57 function unstable_next() {
58 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
59 this,
60 arguments
61 );
62 }
63
64 function unstable_wrapCallback() {
65 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
66 this,
67 arguments
68 );
69 }
70
71 function unstable_getCurrentPriorityLevel() {
72 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
73 this,
74 arguments
75 );
76 }
77
78 function unstable_getFirstCallbackNode() {
79 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
80 this,
81 arguments
82 );
83 }
84
85 function unstable_pauseExecution() {
86 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_pauseExecution.apply(
87 this,
88 arguments
89 );
90 }
91
92 function unstable_continueExecution() {
93 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_continueExecution.apply(
94 this,
95 arguments
96 );
97 }
98
99 return Object.freeze({
100 unstable_now: unstable_now,
101 unstable_scheduleCallback: unstable_scheduleCallback,
102 unstable_cancelCallback: unstable_cancelCallback,
103 unstable_shouldYield: unstable_shouldYield,
104 unstable_runWithPriority: unstable_runWithPriority,
105 unstable_next: unstable_next,
106 unstable_wrapCallback: unstable_wrapCallback,
107 unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
108 unstable_continueExecution: unstable_continueExecution,
109 unstable_pauseExecution: unstable_pauseExecution,
110 unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
111 get unstable_IdlePriority() {
112 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
113 .Scheduler.unstable_IdlePriority;
114 },
115 get unstable_ImmediatePriority() {
116 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
117 .Scheduler.unstable_ImmediatePriority;
118 },
119 get unstable_LowPriority() {
120 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
121 .Scheduler.unstable_LowPriority;
122 },
123 get unstable_NormalPriority() {
124 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
125 .Scheduler.unstable_NormalPriority;
126 },
127 get unstable_UserBlockingPriority() {
128 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
129 .Scheduler.unstable_UserBlockingPriority;
130 },
131 });
132});