@samitouri / QOS-React / commits / b977cf13c4

Remove unneeded declare (#7570)

It turns out that we don't need it, flow is smart enough to realize that the function is declared in the two branches :)

Christopher Chedeau committed Aug 26, 2016 at 08:42 UTC b977cf13c4ddb9a26a91c38eb6b99b5a51f767a6
1 file changed -18
src/isomorphic/hooks/ReactComponentTreeHook.js
-18
@@ -43,24 +43,6 @@ function isNative(fn) {
43 }
44 }
45
46 -type Item = { // eslint-disable-line no-unused-vars
47 - element: ReactElement,
48 - parentID: DebugID,
49 - text: ?string,
50 - childIDs: Array<DebugID>,
51 - isMounted: bool,
52 - updateCount: number,
53 -};
54 -
55 -declare function getItem(id: DebugID): ?Item;
56 -declare function removeItem(id: DebugID): void;
57 -declare function setItem(id: DebugID, item: Item): void;
58 -declare function getItemIDs(): Array<DebugID>;
59 -
60 -declare function addRoot(id: DebugID): void;
61 -declare function removeRoot(id: DebugID): void;
62 -declare function getRootIDs(): Array<DebugID>;
63 -
46 var canUseCollections = (
47 // Array.from
48 typeof Array.from === 'function' &&