From 61ddbd9950aa882cccdd59823b4e80732fcb41ce Mon Sep 17 00:00:00 2001 From: Benjamin Elo Date: Mon, 2 Sep 2019 03:54:48 -0700 Subject: [PATCH] Added TypeScript types file Summary: Luckily I put all my types in one file, so this was very easy to convert over. Reviewed By: danielbuechele Differential Revision: D17132226 fbshipit-source-id: cacd0d66e15504d6f82ccc4aaaa4e27339e513f1 --- src/plugins/navigation/types.tsx | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/plugins/navigation/types.tsx diff --git a/src/plugins/navigation/types.tsx b/src/plugins/navigation/types.tsx new file mode 100644 index 000000000..39cbb62a2 --- /dev/null +++ b/src/plugins/navigation/types.tsx @@ -0,0 +1,52 @@ +/** + * 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 + */ + +export type URI = string; + +export type State = { + shouldShowSaveBookmarkDialog: boolean; + shouldShowURIErrorDialog: boolean; + saveBookmarkURI: URI | null; + requiredParameters: Array; +}; + +export type PersistedState = { + bookmarks: Map; + navigationEvents: Array; + bookmarksProvider: AutoCompleteProvider; + appMatchPatterns: Array; + appMatchPatternsProvider: AutoCompleteProvider; + currentURI: string; +}; + +export type NavigationEvent = { + date: Date | null; + uri: URI | null; + className: string | null; + screenshot: string | null; +}; + +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; +};