Remove Fiber type properties we don't use in DevTools
Ivan Babak committed
Apr 28, 2019 at 12:57 UTC
d35cf80921245ff7da4bcc7c17f68082f21088fb
1 file changed
+3
-23
src/backend/types.js
+3
-23
@@ -8,7 +8,6 @@ type BundleType =
8
| 1; // DEV
9
10
export type WorkTag = number;
11
-export type TypeOfMode = number;
11
export type SideEffectTag = number;
12
export type ExpirationTime = number;
13
export type RefObject = {|
@@ -30,7 +29,9 @@ export type HookType =
29
| 'useImperativeHandle'
30
| 'useDebugValue';
31
33
-// Copied modified from https://github.com/facebook/react/blob/v16.9.0-alpha.0/packages/react-reconciler/src/ReactFiber.js
32
+// The Fiber type is copied from React and should be kept in sync:
33
+// https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiber.js
34
+// The properties we don't use in DevTools are omitted.
35
export type Fiber = {|
36
tag: WorkTag,
37
@@ -53,41 +54,20 @@ export type Fiber = {|
54
pendingProps: any, // This type will be more specific once we overload the tag.
55
memoizedProps: any, // The props used to create the output.
56
56
- // updateQueue: UpdateQueue<any> | null,
57
-
57
memoizedState: any,
58
60
- // contextDependencies: ContextDependencyList | null,
61
-
62
- mode: TypeOfMode,
63
-
59
effectTag: SideEffectTag,
60
66
- nextEffect: Fiber | null,
67
-
68
- firstEffect: Fiber | null,
69
- lastEffect: Fiber | null,
70
-
71
- expirationTime: ExpirationTime,
72
-
73
- childExpirationTime: ExpirationTime,
74
-
61
alternate: Fiber | null,
62
63
actualDuration?: number,
64
65
actualStartTime?: number,
66
81
- selfBaseDuration?: number,
82
-
67
treeBaseDuration?: number,
68
85
- _debugID?: number,
69
_debugSource?: Source | null,
70
_debugOwner?: Fiber | null,
88
- _debugIsCurrentlyTiming?: boolean,
89
-
90
- _debugHookTypes?: Array<HookType> | null,
71
|};
72
73
// TODO: If it's useful for the frontend to know which types of data an Element has