Skip to content

Commit 6651b7c

Browse files
panagosg7facebook-github-bot
authored andcommitted
restore core lib Flow definitions for Request, Response, etc.
Summary: The main change of this diff is in file react-native-github/interface.js. This file used to override the definitions for `fetch`, `Headers`, `Request`, `Response`, `requestAnimationFrame` of flow/lib/bom.js and type them as `any` instead. This is inconsistent with the rest of the flow library definitions that expect `Request`, for example, to be adequately typed. Overriding this defnition with `any` raises `[value-as-type]` errors in the library definitions themselves. Due to a Flow bug, these errors were silently suppressed, leading to loss of coverage. I'm trying to clean-up these errors and fix the Flow bug so that library errors are always surfaced. This diff also: * Removes 53 unused suppression comments * Adds 110 new error suppressions Changelog: [Internal] Reviewed By: pieterv Differential Revision: D25806504 fbshipit-source-id: e312bc5d64818b63c3b8b4f86dea51e13aacfac0
1 parent d3a3ce8 commit 6651b7c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

interface.js

-8
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,3 @@ declare var __DEV__: boolean;
1515
declare var __REACT_DEVTOOLS_GLOBAL_HOOK__: any; /*?{
1616
inject: ?((stuff: Object) => void)
1717
};*/
18-
19-
declare var fetch: any;
20-
declare var Headers: any;
21-
declare var Request: any;
22-
declare var Response: any;
23-
declare module requestAnimationFrame {
24-
declare module.exports: (callback: any) => any;
25-
}

0 commit comments

Comments
 (0)