From 239bb27ed16a1223e86dca61bd771c769f83ce75 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Thu, 12 Sep 2019 08:08:01 -0700 Subject: [PATCH] Remove ts-ignore for TableNativePlugin Summary: Unnecessary and very broad - effectively disabling all of tsc for the class. Reviewed By: jknoxville Differential Revision: D17342993 fbshipit-source-id: 609ce2cbd69bd83749111f64b1784fd4965c9704 --- src/plugins/TableNativePlugin.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/TableNativePlugin.tsx b/src/plugins/TableNativePlugin.tsx index 537215b5c..8d625dc05 100644 --- a/src/plugins/TableNativePlugin.tsx +++ b/src/plugins/TableNativePlugin.tsx @@ -247,7 +247,6 @@ type IncomingMessage = | {method: 'clearTable'}; export default function createTableNativePlugin(id: string, title: string) { - // @ts-ignore return class extends FlipperPlugin { static keyboardActions: KeyboardActions = ['clear', 'createPaste']; static id = id || ''; @@ -311,16 +310,17 @@ export default function createTableNativePlugin(id: string, title: string) { static persistedStateReducer( persistedState: PersistedState, - method: 'updateRows' | 'clearTable', + method: string, data: Array | undefined, ): Partial { + const methodEnum = method as 'updateRows' | 'clearTable'; const message: IncomingMessage = - method === 'updateRows' + methodEnum === 'updateRows' ? { - method, + method: methodEnum, data: data || [], } - : {method}; + : {method: methodEnum}; return this.typedPersistedStateReducer(persistedState, message); }