From 4dcb34ea32dba72380720f65b2039b126d141e46 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Tue, 23 Apr 2019 11:32:07 -0700 Subject: [PATCH] Fixed Flow error --- src/devtools/cache.js | 2 +- src/devtools/views/Components/InspectedElementContext.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/devtools/cache.js b/src/devtools/cache.js index 8038dbcd4a..7aec26f21e 100644 --- a/src/devtools/cache.js +++ b/src/devtools/cache.js @@ -13,7 +13,7 @@ import LRU from 'lru-cache'; // The size of this cache is bounded by how many renders were profiled, // and it will be fully reset between profiling sessions. -type Thenable = { +export type Thenable = { then(resolve: (T) => mixed, reject: (mixed) => mixed): mixed, }; diff --git a/src/devtools/views/Components/InspectedElementContext.js b/src/devtools/views/Components/InspectedElementContext.js index 0ef21d598b..1aed0dd63e 100644 --- a/src/devtools/views/Components/InspectedElementContext.js +++ b/src/devtools/views/Components/InspectedElementContext.js @@ -17,7 +17,7 @@ import type { InspectedElement, InspectedElementResponse, } from 'src/devtools/views/Components/types'; -import type { Resource } from '../../cache'; +import type { Resource, Thenable } from '../../cache'; type Context = {| read(id: number): InspectedElement | null, @@ -28,7 +28,7 @@ InspectedElementContext.displayName = 'InspectedElementContext'; type ResolveFn = (inspectedElement: InspectedElement) => void; type InProgressRequest = {| - promise: Promise, + promise: Thenable, resolveFn: ResolveFn, |};