Cleanup clear/set/throwImmediate
Reviewed By: vjeux Differential Revision: D3703300 fbshipit-source-id: ad03d558d6af61aba17899ec256d71fdda4c4c84
This commit is contained in:
parent
c2a41e42f2
commit
ad677426cf
|
@ -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<any>): number;
|
||||
|
||||
/**
|
||||
* Schedule an asynchronous update to the interaction state.
|
||||
*/
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
Loading…
Reference in New Issue