From f9050e09084cf3700bfc1954f97adf0f60cd8d88 Mon Sep 17 00:00:00 2001 From: flowkraD Date: Mon, 5 Nov 2018 15:03:16 -0800 Subject: [PATCH] Flow strict DrawerLayout (#22152) Summary: Issue in focus: #22100 The only occurrence of `Object` was replaced with the appropriate flow type A Lint error was encountered in `deepFreezeAndThrowOnMutationInDev-test.js` when running `npm run lint` and was fixed by running `yarn prettier` Pull Request resolved: https://github.com/facebook/react-native/pull/22152 Differential Revision: D12930872 Pulled By: RSNara fbshipit-source-id: f9706ed2e49d9ccedfa331594c886d2d3b615db5 --- .../Components/DrawerAndroid/DrawerLayoutAndroid.android.js | 2 +- .../__tests__/deepFreezeAndThrowOnMutationInDev-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js index b58385ef941911..a9b00611591e78 100644 --- a/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +++ b/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js @@ -152,7 +152,7 @@ const DrawerLayoutAndroid = createReactClass({ mixins: [NativeMethodsMixin], - getDefaultProps: function(): Object { + getDefaultProps: function(): {drawerBackgroundColor: string} { return { drawerBackgroundColor: 'white', }; diff --git a/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js b/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js index 1ed6231c663603..f3f8c016026e32 100644 --- a/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js +++ b/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js @@ -134,7 +134,7 @@ describe('deepFreezeAndThrowOnMutationInDev', function() { expect(o.key1.key2).toBe('newValue'); }); - it('shouldn\'t recurse infinitely', () => { + it("shouldn't recurse infinitely", () => { __DEV__ = true; const o = {}; o.circular = o;