Conditionally export JSTimers
Reviewed By: fkgozali Differential Revision: D5446953 fbshipit-source-id: c08bd873024d591f5186a3a6767f319de3b6b6d8
This commit is contained in:
parent
7e29b1fc77
commit
a68f6fab0f
|
@ -12,6 +12,7 @@
|
|||
var remoteModulesConfig = [
|
||||
['RemoteModule1',null,['remoteMethod','promiseMethod'],[]],
|
||||
['RemoteModule2',null,['remoteMethod','promiseMethod'],[]],
|
||||
['Timing',null,['callImmediates']],
|
||||
];
|
||||
|
||||
var MessageQueueTestConfig = {
|
||||
|
|
|
@ -478,4 +478,10 @@ const JSTimers = {
|
|||
},
|
||||
};
|
||||
|
||||
module.exports = JSTimers;
|
||||
if (!Timing) {
|
||||
console.warn("Timing native module is not available, can't set timers.");
|
||||
// $FlowFixMe: we can assume timers are generally available
|
||||
module.exports = ({}: typeof JSTimers);
|
||||
} else {
|
||||
module.exports = JSTimers;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue