From 36a1c0046c89ffb9aa1e5b491d21e846b6e2fe66 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Fri, 9 Aug 2019 03:16:42 -0700 Subject: [PATCH] Migrate createPaste Summary: _typescript_ Reviewed By: jknoxville Differential Revision: D16649018 fbshipit-source-id: c30d4ec390946e4b6de49ffeccc452d0a55c1e7a --- src/NotificationsHub.js | 2 +- src/createTablePlugin.js | 2 +- src/fb-stubs/{createPaste.js => createPaste.tsx} | 4 +++- src/index.js | 3 +-- src/plugins/TableNativePlugin.js | 2 +- src/ui/components/data-inspector/DataInspector.js | 2 +- src/ui/components/table/ManagedTable.js | 2 +- src/ui/components/table/ManagedTable_immutable.js | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) rename src/fb-stubs/{createPaste.js => createPaste.tsx} (72%) diff --git a/src/NotificationsHub.js b/src/NotificationsHub.js index 82946bb05..95ee38d78 100644 --- a/src/NotificationsHub.js +++ b/src/NotificationsHub.js @@ -38,7 +38,7 @@ import { } from './reducers/notifications.tsx'; import {selectPlugin} from './reducers/connections.tsx'; import {textContent} from './utils/index'; -import createPaste from './fb-stubs/createPaste'; +import createPaste from './fb-stubs/createPaste.tsx'; export default class Notifications extends FlipperDevicePlugin<{}> { static id = 'notifications'; diff --git a/src/createTablePlugin.js b/src/createTablePlugin.js index d6c619c61..40d82e777 100644 --- a/src/createTablePlugin.js +++ b/src/createTablePlugin.js @@ -18,7 +18,7 @@ import DetailSidebar from './chrome/DetailSidebar'; import {FlipperPlugin} from './plugin.tsx'; import SearchableTable_immutable from './ui/components/searchable/SearchableTable_immutable'; import textContent from './utils/textContent.js'; -import createPaste from './fb-stubs/createPaste.js'; +import createPaste from './fb-stubs/createPaste.tsx'; import {List, Map as ImmutableMap} from 'immutable'; diff --git a/src/fb-stubs/createPaste.js b/src/fb-stubs/createPaste.tsx similarity index 72% rename from src/fb-stubs/createPaste.js rename to src/fb-stubs/createPaste.tsx index dff727396..5e319abd4 100644 --- a/src/fb-stubs/createPaste.js +++ b/src/fb-stubs/createPaste.tsx @@ -5,6 +5,8 @@ * @format */ -export default function createPaste(input: string): Promise { +export default function createPaste( + input: string, +): Promise { return Promise.reject('Not implemented!'); } diff --git a/src/index.js b/src/index.js index 8b6bce868..77d3c9968 100644 --- a/src/index.js +++ b/src/index.js @@ -9,7 +9,7 @@ export {default as styled, keyframes} from 'react-emotion'; export * from './ui/index.js'; export * from './utils/index.js'; export {default as GK} from './fb-stubs/GK.tsx'; -export {default as createPaste} from './fb-stubs/createPaste.js'; +export {default as createPaste} from './fb-stubs/createPaste.tsx'; export {graphQLQuery} from './fb-stubs/user.js'; export { FlipperBasePlugin, @@ -22,7 +22,6 @@ export type {MetricType} from './utils/exportMetrics.js'; export {default as Client} from './Client.tsx'; export {clipboard} from 'electron'; export * from './fb-stubs/constants.js'; -export * from './fb-stubs/createPaste.js'; export {connect} from 'react-redux'; export {selectPlugin} from './reducers/connections.tsx'; export {getPluginKey, getPersistedState} from './utils/pluginUtils.js'; diff --git a/src/plugins/TableNativePlugin.js b/src/plugins/TableNativePlugin.js index 4cace19de..5dec7278c 100644 --- a/src/plugins/TableNativePlugin.js +++ b/src/plugins/TableNativePlugin.js @@ -22,7 +22,7 @@ import DetailSidebar from '../chrome/DetailSidebar'; import {FlipperPlugin} from '../plugin.tsx'; import SearchableTable from '../ui/components/searchable/SearchableTable'; import textContent from '../utils/textContent.js'; -import createPaste from '../fb-stubs/createPaste.js'; +import createPaste from '../fb-stubs/createPaste.tsx'; import type {Node} from 'react'; import type { diff --git a/src/ui/components/data-inspector/DataInspector.js b/src/ui/components/data-inspector/DataInspector.js index a810bd66c..886a7d577 100644 --- a/src/ui/components/data-inspector/DataInspector.js +++ b/src/ui/components/data-inspector/DataInspector.js @@ -11,7 +11,7 @@ import ContextMenu from '../ContextMenu.js'; import Tooltip from '../Tooltip.js'; import styled from '../../styled/index.js'; import DataPreview from './DataPreview.js'; -import createPaste from '../../../fb-stubs/createPaste.js'; +import createPaste from '../../../fb-stubs/createPaste.tsx'; import {reportInteraction} from '../../../utils/InteractionTracker.js'; import {getSortedKeys} from './utils.js'; import {colors} from '../colors.js'; diff --git a/src/ui/components/table/ManagedTable.js b/src/ui/components/table/ManagedTable.js index 88b57ca7a..8c2e92707 100644 --- a/src/ui/components/table/ManagedTable.js +++ b/src/ui/components/table/ManagedTable.js @@ -27,7 +27,7 @@ import TableHead from './TableHead.js'; import TableRow from './TableRow.js'; import ContextMenu from '../ContextMenu.js'; import FlexColumn from '../FlexColumn.js'; -import createPaste from '../../../fb-stubs/createPaste.js'; +import createPaste from '../../../fb-stubs/createPaste.tsx'; import debounceRender from 'react-debounce-render'; import debounce from 'lodash.debounce'; import {DEFAULT_ROW_HEIGHT} from './types'; diff --git a/src/ui/components/table/ManagedTable_immutable.js b/src/ui/components/table/ManagedTable_immutable.js index f7fa7679a..28b3402a7 100644 --- a/src/ui/components/table/ManagedTable_immutable.js +++ b/src/ui/components/table/ManagedTable_immutable.js @@ -27,7 +27,7 @@ import TableHead from './TableHead.js'; import TableRow from './TableRow.js'; import ContextMenu from '../ContextMenu.js'; import FlexColumn from '../FlexColumn.js'; -import createPaste from '../../../fb-stubs/createPaste.js'; +import createPaste from '../../../fb-stubs/createPaste.tsx'; import debounceRender from 'react-debounce-render'; import debounce from 'lodash.debounce'; import {DEFAULT_ROW_HEIGHT} from './types';