Skip to content

Commit

Permalink
Use real flow types from metro
Browse files Browse the repository at this point in the history
Summary: Stop ignoring `metro` folder from RN and use their flowtypes correctly

Reviewed By: hramos

Differential Revision: D13085169

fbshipit-source-id: f285223afb7e89ac2c63e53d36be2f3645fa6761
  • Loading branch information
rafeca authored and facebook-github-bot committed Nov 22, 2018
1 parent 8f283b9 commit 98546e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 71 deletions.
3 changes: 0 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/invariant')
.*/node_modules/invariant/.*
Expand Down
3 changes: 0 additions & 3 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*

; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/invariant')
.*/node_modules/invariant/.*
Expand Down
68 changes: 3 additions & 65 deletions flow-github/metro.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,8 @@
* @format
*/

declare module 'metro' {
declare module.exports: any;
}

declare module 'metro/src/HmrServer' {
declare module.exports: any;
}

declare module 'metro/src/lib/attachWebsocketServer' {
declare module.exports: any;
}

declare module 'metro/src/lib/bundle-modules/HMRClient' {
declare module.exports: any;
}

declare module 'metro/src/lib/TerminalReporter' {
declare module.exports: any;
}

declare module 'metro/src/Bundler' {
declare module.exports: any;
}

declare module 'metro/src/DeltaBundler' {
declare module.exports: any;
}

declare module 'metro/src/DeltaBundler/types.flow.js' {
declare module.exports: any;
}

declare module 'metro/src/ModuleGraph/types.flow.js' {
declare module.exports: any;
}

declare module 'metro/src/lib/getMaxWorkers' {
declare module.exports: any;
}

declare module 'metro/src/lib/createModuleIdFactory' {
declare module.exports: any;
}

declare module 'metro/src/shared/types.flow' {
declare module.exports: any;
}

declare module 'metro/src/lib/reporting' {
declare module.exports: any;
}

declare module 'metro/src/Server' {
declare module.exports: any;
}

declare module 'metro/src/ModuleGraph/worker/collectDependencies' {
declare module.exports: any;
}

declare module 'metro/src/JSTransformer/worker' {
declare module.exports: any;
}

declare module 'metro/src/DeltaBundler/Serializers/plainJSBundle' {
// metro-visualizer is not listed as a dependency of metro since it pulls a lot
// of transitive dependencies so we need to tell flow that it may exist.
declare module 'metro-visualizer' {
declare module.exports: any;
}

0 comments on commit 98546e9

Please sign in to comment.