diff --git a/Libraries/Interaction/InteractionManager.js b/Libraries/Interaction/InteractionManager.js index 845df4d89..c4216344c 100644 --- a/Libraries/Interaction/InteractionManager.js +++ b/Libraries/Interaction/InteractionManager.js @@ -19,7 +19,6 @@ const TaskQueue = require('TaskQueue'); const infoLog = require('infoLog'); const invariant = require('fbjs/lib/invariant'); const keyMirror = require('fbjs/lib/keyMirror'); -const setImmediate = require('setImmediate'); type Handle = number; import type {Task} from 'TaskQueue'; @@ -152,6 +151,8 @@ let _nextUpdateHandle = 0; let _inc = 0; let _deadline = -1; +declare function setImmediate(callback: any, ...args: Array): number; + /** * Schedule an asynchronous update to the interaction state. */ diff --git a/Libraries/vendor/core/clearImmediate.js b/Libraries/vendor/core/clearImmediate.js deleted file mode 100644 index 75540149f..000000000 --- a/Libraries/vendor/core/clearImmediate.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule clearImmediate - */ - -module.exports = global.clearImmediate; diff --git a/Libraries/vendor/core/setImmediate.js b/Libraries/vendor/core/setImmediate.js deleted file mode 100644 index 265f98a45..000000000 --- a/Libraries/vendor/core/setImmediate.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule setImmediate - */ - -module.exports = global.setImmediate; diff --git a/Libraries/vendor/core/throwImmediate.js b/Libraries/vendor/core/throwImmediate.js deleted file mode 100644 index 0d12c3097..000000000 --- a/Libraries/vendor/core/throwImmediate.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * @generated SignedSource<<5c985f16e4f2e576657ab2b1551adf97>> - * - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * !! This file is a check-in of a static_upstream project! !! - * !! !! - * !! You should not modify this file directly. Instead: !! - * !! 1) Use `fjs use-upstream` to temporarily replace this with !! - * !! the latest version from upstream. !! - * !! 2) Make your changes, test them, etc. !! - * !! 3) Use `fjs push-upstream` to copy your changes back to !! - * !! static_upstream. !! - * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - * - * Copyright 2004-present Facebook. All Rights Reserved. - * - * @providesModule throwImmediate - * @typechecks - */ - -'use strict'; - -var setImmediate = require('setImmediate'); - -function throwArg(error) { - throw error; -} - -/** - * Throws the supplied error in a new execution loop. - * - * @param {*} error - */ -function throwImmediate(error) { - setImmediate(throwArg, error); -} - -module.exports = throwImmediate;