UNPKG

2.38 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'use strict';
11
12(function(global, factory) {
13 // eslint-disable-next-line no-unused-expressions
14 typeof exports === 'object' && typeof module !== 'undefined'
15 ? (module.exports = factory(require('react')))
16 : typeof define === 'function' && define.amd // eslint-disable-line no-undef
17 ? define(['react'], factory) // eslint-disable-line no-undef
18 : (global.SchedulerTracing = factory(global));
19})(this, function(global) {
20 function unstable_clear() {
21 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
22 this,
23 arguments
24 );
25 }
26
27 function unstable_getCurrent() {
28 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
29 this,
30 arguments
31 );
32 }
33
34 function unstable_getThreadID() {
35 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
36 this,
37 arguments
38 );
39 }
40
41 function unstable_subscribe() {
42 // eslint-disable-next-line max-len
43 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
44 this,
45 arguments
46 );
47 }
48
49 function unstable_trace() {
50 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
51 this,
52 arguments
53 );
54 }
55
56 function unstable_unsubscribe() {
57 // eslint-disable-next-line max-len
58 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
59 this,
60 arguments
61 );
62 }
63
64 function unstable_wrap() {
65 return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
66 this,
67 arguments
68 );
69 }
70
71 return Object.freeze({
72 unstable_clear: unstable_clear,
73 unstable_getCurrent: unstable_getCurrent,
74 unstable_getThreadID: unstable_getThreadID,
75 unstable_subscribe: unstable_subscribe,
76 unstable_trace: unstable_trace,
77 unstable_unsubscribe: unstable_unsubscribe,
78 unstable_wrap: unstable_wrap,
79 });
80});