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
This commit is contained in:
committed by
Facebook Github Bot
parent
4453dec778
commit
61ddbd9950
52
src/plugins/navigation/types.tsx
Normal file
52
src/plugins/navigation/types.tsx
Normal file
@@ -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<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 | null;
|
||||
uri: URI | null;
|
||||
className: string | null;
|
||||
screenshot: string | null;
|
||||
};
|
||||
|
||||
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