mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fixed Flow error
This commit is contained in:
@@ -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<T> = {
|
||||
export type Thenable<T> = {
|
||||
then(resolve: (T) => mixed, reject: (mixed) => mixed): mixed,
|
||||
};
|
||||
|
||||
|
||||
@@ -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<InspectedElement>,
|
||||
promise: Thenable<InspectedElement>,
|
||||
resolveFn: ResolveFn,
|
||||
|};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user