From d906de7f602df810c38aa622c83023228b047db6 Mon Sep 17 00:00:00 2001 From: Sam Goldman Date: Fri, 15 Dec 2017 04:17:46 -0800 Subject: [PATCH] Use `declare module.exports` syntax for flow libdefs (#11861) We added this to Flow in v0.25 (about 2 years ago), but never actually deprecated the legacy `declare var exports` syntax. Hoping to do that soon, so clearing up uses that I can find. Test Plan: flow --- scripts/flow/react-native-host-hooks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/flow/react-native-host-hooks.js b/scripts/flow/react-native-host-hooks.js index 1bfb9421fa..42bad64d53 100644 --- a/scripts/flow/react-native-host-hooks.js +++ b/scripts/flow/react-native-host-hooks.js @@ -10,10 +10,10 @@ /* eslint-disable */ declare module 'deepDiffer' { - declare function exports(one: any, two: any): boolean; + declare module.exports: (one: any, two: any) => boolean; } declare module 'deepFreezeAndThrowOnMutationInDev' { - declare function exports(obj: T): T; + declare module.exports: (obj: T) => T; } declare module 'flattenStyle' { } @@ -83,7 +83,7 @@ declare module 'UIManager' { ): Promise; } declare module 'View' { - declare var exports: typeof React$Component; + declare module.exports: typeof React$Component; } declare module 'RTManager' {