Skip to content

Commit

Permalink
Fix ESLint upgrade "parsing error"
Browse files Browse the repository at this point in the history
Reviewed By: adamjernst

Differential Revision: D6959356

fbshipit-source-id: 77c61998f23a6acd7cdfe2c87d8760a23d957800
  • Loading branch information
zertosh authored and facebook-github-bot committed Feb 10, 2018
1 parent bba19e8 commit 9d21496
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Libraries/Core/Timers/JSTimers.js
Expand Up @@ -244,11 +244,7 @@ const JSTimers = {
* @param {function} func Callback to be invoked after `duration` ms. * @param {function} func Callback to be invoked after `duration` ms.
* @param {number} duration Number of milliseconds. * @param {number} duration Number of milliseconds.
*/ */
setTimeout: function( setTimeout: function(func: Function, duration: number, ...args: any): number {
func: Function,
duration: number,
...args?: any
): number {
if (__DEV__ && IS_ANDROID && duration > MAX_TIMER_DURATION_MS) { if (__DEV__ && IS_ANDROID && duration > MAX_TIMER_DURATION_MS) {
console.warn( console.warn(
ANDROID_LONG_TIMER_MESSAGE + ANDROID_LONG_TIMER_MESSAGE +
Expand All @@ -273,7 +269,7 @@ const JSTimers = {
setInterval: function( setInterval: function(
func: Function, func: Function,
duration: number, duration: number,
...args?: any ...args: any
): number { ): number {
if (__DEV__ && IS_ANDROID && duration > MAX_TIMER_DURATION_MS) { if (__DEV__ && IS_ANDROID && duration > MAX_TIMER_DURATION_MS) {
console.warn( console.warn(
Expand All @@ -296,7 +292,7 @@ const JSTimers = {
* @param {function} func Callback to be invoked before the end of the * @param {function} func Callback to be invoked before the end of the
* current JavaScript execution loop. * current JavaScript execution loop.
*/ */
setImmediate: function(func: Function, ...args?: any) { setImmediate: function(func: Function, ...args: any) {
const id = _allocateCallback( const id = _allocateCallback(
() => func.apply(undefined, args), () => func.apply(undefined, args),
'setImmediate', 'setImmediate',
Expand Down

0 comments on commit 9d21496

Please sign in to comment.