Upgrading flow and fixing lint errors
Summary: Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86. Also fixing some linting issues. Reviewed By: priteshrnandgaonkar Differential Revision: D13900794 fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
This commit is contained in:
committed by
Facebook Github Bot
parent
88cc299811
commit
09a93cd9e6
@@ -8,8 +8,6 @@
|
||||
import LogManager from '../fb-stubs/Logger';
|
||||
import {RecurringError} from './errors';
|
||||
import {promisify} from 'util';
|
||||
import child_process from 'child_process';
|
||||
const exec = promisify(child_process.exec);
|
||||
const fs = require('fs');
|
||||
const adb = require('adbkit-fb');
|
||||
import {
|
||||
|
||||
@@ -14,10 +14,10 @@ import {getInstance} from '../fb-stubs/Logger';
|
||||
|
||||
Use this variant to report failures in core platform (Flipper) code.
|
||||
*/
|
||||
export function reportPlatformFailures(
|
||||
promise: Promise<*>,
|
||||
export function reportPlatformFailures<T>(
|
||||
promise: Promise<T>,
|
||||
name: string,
|
||||
): Promise<*> {
|
||||
): Promise<T> {
|
||||
return promise.then(
|
||||
fulfilledValue => {
|
||||
getInstance().track('success-rate', name, 1);
|
||||
@@ -37,11 +37,11 @@ export function reportPlatformFailures(
|
||||
|
||||
Use this variant to report failures in plugin code.
|
||||
*/
|
||||
export function reportPluginFailures(
|
||||
promise: Promise<*>,
|
||||
export function reportPluginFailures<T>(
|
||||
promise: Promise<T>,
|
||||
name: string,
|
||||
plugin: string,
|
||||
): Promise<*> {
|
||||
): Promise<T> {
|
||||
return promise.then(
|
||||
fulfilledValue => {
|
||||
getInstance().track('success-rate', name, 1, plugin);
|
||||
|
||||
Reference in New Issue
Block a user