Removed flow-types file
Summary: This completes the navigation plugin ts migration by removing the flow types file. Reviewed By: passy Differential Revision: D17181605 fbshipit-source-id: b4931d28664e990c37dea229a7fe3f52685e5ee7
This commit is contained in:
committed by
Facebook Github Bot
parent
ffd4a29bba
commit
4e71d9b1ea
@@ -10,7 +10,7 @@ import {connect} from 'react-redux';
|
|||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import {State as Store} from '../reducers';
|
import {State as Store} from '../reducers';
|
||||||
import {readBookmarksFromDB} from '../plugins/navigation/util/indexedDB';
|
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 BaseDevice from '../devices/BaseDevice';
|
||||||
import {State as PluginState} from 'src/reducers/pluginStates';
|
import {State as PluginState} from 'src/reducers/pluginStates';
|
||||||
|
|
||||||
@@ -109,10 +109,9 @@ class LocationsButton extends Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mapStateFromPluginStatesToProps = (pluginStates: PluginState) => {
|
const mapStateFromPluginStatesToProps = (pluginStates: PluginState) => {
|
||||||
const navPluginState: NavPluginState =
|
const navPluginState = pluginStates[
|
||||||
pluginStates[
|
|
||||||
Object.keys(pluginStates).find(key => /#Navigation$/.test(key))
|
Object.keys(pluginStates).find(key => /#Navigation$/.test(key))
|
||||||
];
|
] as (NavPluginState | null);
|
||||||
const currentURI = navPluginState && navPluginState.currentURI;
|
const currentURI = navPluginState && navPluginState.currentURI;
|
||||||
return {
|
return {
|
||||||
currentURI,
|
currentURI,
|
||||||
|
|||||||
@@ -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<string>,
|
|
||||||
|};
|
|
||||||
|
|
||||||
export type PersistedState = {|
|
|
||||||
bookmarks: Map<URI, Bookmark>,
|
|
||||||
navigationEvents: Array<NavigationEvent>,
|
|
||||||
bookmarksProvider: AutoCompleteProvider,
|
|
||||||
appMatchPatterns: Array<AppMatchPattern>,
|
|
||||||
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<string, URI>,
|
|
||||||
|};
|
|
||||||
|
|
||||||
export type AutoCompleteLineItem = {|
|
|
||||||
icon: string,
|
|
||||||
matchPattern: string,
|
|
||||||
uri: URI,
|
|
||||||
|};
|
|
||||||
|
|
||||||
export type AppMatchPattern = {|
|
|
||||||
className: string,
|
|
||||||
pattern: string,
|
|
||||||
|};
|
|
||||||
Reference in New Issue
Block a user