From 9ebf5346df271242e3b6b1e01e7b57ec681a1cb0 Mon Sep 17 00:00:00 2001 From: Ivelin Rachev Date: Mon, 9 Sep 2019 03:48:33 -0700 Subject: [PATCH] Convert Flipper plugin "mobileboost" to TypeScript Summary: Bugfix for Tab.tsx + implicitly typed react vizualized Reviewed By: danielbuechele Differential Revision: D17205342 fbshipit-source-id: 48d29c583f0790af46f3d9c8d0280015b58d56aa --- src/ui/components/Tab.tsx | 2 +- types/react-virtualized.d.tsx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 types/react-virtualized.d.tsx diff --git a/src/ui/components/Tab.tsx b/src/ui/components/Tab.tsx index e48685bad..8bd3157c9 100644 --- a/src/ui/components/Tab.tsx +++ b/src/ui/components/Tab.tsx @@ -38,6 +38,6 @@ export type Props = { width?: WidthProperty; }; -export default function Tab(_props: Props) { +export default function Tab(_props: Props): JSX.Element { throw new Error("don't render me"); } diff --git a/types/react-virtualized.d.tsx b/types/react-virtualized.d.tsx new file mode 100644 index 000000000..9a7c90bea --- /dev/null +++ b/types/react-virtualized.d.tsx @@ -0,0 +1,11 @@ +/** + * 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 + */ + +declare module 'react-virtualized' { + const AutoSizer: any; + const Collection: any; +}