From 1de1bbaf8ac30d499372221b5abaedc2ba527221 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 2 Oct 2019 08:34:30 -0700 Subject: [PATCH] Prepare for TypeScript 3.7 Summary: These are the only four errors currently happening when upgrading to the 3.7 beta. Luckily, these are all forwards-compatible changes. Reviewed By: jknoxville Differential Revision: D17711797 fbshipit-source-id: 429036e90300c81848cc3252b67bb89871ff2e32 --- src/chrome/LocationsButton.tsx | 4 ++-- src/plugins/cpu/index.tsx | 4 ++-- src/plugins/navigation/components/SearchBar.tsx | 4 ++-- src/plugins/navigation/index.tsx | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/chrome/LocationsButton.tsx b/src/chrome/LocationsButton.tsx index e6b3e0f49..ab7d76096 100644 --- a/src/chrome/LocationsButton.tsx +++ b/src/chrome/LocationsButton.tsx @@ -99,9 +99,9 @@ class LocationsButton extends Component { }); }; - componentDidMount = () => { + componentDidMount() { this.updateBookmarks(); - }; + } render() { const {currentURI} = this.props; diff --git a/src/plugins/cpu/index.tsx b/src/plugins/cpu/index.tsx index b4984c8fc..674929892 100644 --- a/src/plugins/cpu/index.tsx +++ b/src/plugins/cpu/index.tsx @@ -391,9 +391,9 @@ export default class CPUFrequencyTable extends FlipperDevicePlugin< }); }; - teardown = () => { + teardown() { this.cleanup(); - }; + } buildRow = (freq: CPUFrequency, idx: number) => { const selected = this.state.selectedIds.indexOf(idx) >= 0; diff --git a/src/plugins/navigation/components/SearchBar.tsx b/src/plugins/navigation/components/SearchBar.tsx index 1ad1b809d..4d93c2a2a 100644 --- a/src/plugins/navigation/components/SearchBar.tsx +++ b/src/plugins/navigation/components/SearchBar.tsx @@ -91,7 +91,7 @@ class SearchBar extends Component { return null; }; - render = () => { + render() { const {bookmarks, providers} = this.props; const { autoCompleteSheetOpen, @@ -158,7 +158,7 @@ class SearchBar extends Component { ); - }; + } } export default SearchBar; diff --git a/src/plugins/navigation/index.tsx b/src/plugins/navigation/index.tsx index 0f13aa7de..8036bd67f 100644 --- a/src/plugins/navigation/index.tsx +++ b/src/plugins/navigation/index.tsx @@ -100,7 +100,7 @@ export default class extends FlipperPlugin { ); }; - componentDidMount = () => { + componentDidMount() { const {selectedApp} = this.props; this.subscribeToNavigationEvents(); this.getDevice() @@ -122,7 +122,7 @@ export default class extends FlipperPlugin { bookmarksProvider: bookmarksToAutoCompleteProvider(bookmarks), }); }); - }; + } navigateTo = async (query: string) => { const filteredQuery = filterOptionalParameters(query);