diff --git a/src/chrome/LocationsButton.tsx b/src/chrome/LocationsButton.tsx index e84d32c25..43b771a75 100644 --- a/src/chrome/LocationsButton.tsx +++ b/src/chrome/LocationsButton.tsx @@ -10,7 +10,7 @@ import {connect} from 'react-redux'; import React, {Component} from 'react'; import {State as Store} from '../reducers'; import {readBookmarksFromDB} from '../plugins/navigation/util/indexedDB'; -import {State as NavPluginState} from '../plugins/navigation/flow-types'; +import {PersistedState as NavPluginState} from '../plugins/navigation/types'; import BaseDevice from '../devices/BaseDevice'; import {State as PluginState} from 'src/reducers/pluginStates'; @@ -109,10 +109,9 @@ class LocationsButton extends Component { } const mapStateFromPluginStatesToProps = (pluginStates: PluginState) => { - const navPluginState: NavPluginState = - pluginStates[ - Object.keys(pluginStates).find(key => /#Navigation$/.test(key)) - ]; + const navPluginState = pluginStates[ + Object.keys(pluginStates).find(key => /#Navigation$/.test(key)) + ] as (NavPluginState | null); const currentURI = navPluginState && navPluginState.currentURI; return { currentURI, diff --git a/src/plugins/navigation/flow-types.js b/src/plugins/navigation/flow-types.js deleted file mode 100644 index 47f8418d3..000000000 --- a/src/plugins/navigation/flow-types.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Copyright 2018-present Facebook. - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * @format - * @flow strict-local - */ - -export type URI = string; - -export type State = {| - shouldShowSaveBookmarkDialog: boolean, - shouldShowURIErrorDialog: boolean, - saveBookmarkURI: ?URI, - requiredParameters: Array, -|}; - -export type PersistedState = {| - bookmarks: Map, - navigationEvents: Array, - bookmarksProvider: AutoCompleteProvider, - appMatchPatterns: Array, - appMatchPatternsProvider: AutoCompleteProvider, - currentURI: string, -|}; - -export type NavigationEvent = {| - date: ?Date, - uri: ?URI, - className: ?string, - screenshot: ?string, -|}; - -export type Bookmark = {| - uri: URI, - commonName: string, -|}; - -export type AutoCompleteProvider = {| - icon: string, - matchPatterns: Map, -|}; - -export type AutoCompleteLineItem = {| - icon: string, - matchPattern: string, - uri: URI, -|}; - -export type AppMatchPattern = {| - className: string, - pattern: string, -|};