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
This commit is contained in:
Pascal Hartig
2019-09-12 08:08:01 -07:00
committed by Facebook Github Bot
parent e25c1e7aaf
commit 239bb27ed1

View File

@@ -247,7 +247,6 @@ type IncomingMessage =
| {method: 'clearTable'}; | {method: 'clearTable'};
export default function createTableNativePlugin(id: string, title: string) { export default function createTableNativePlugin(id: string, title: string) {
// @ts-ignore
return class extends FlipperPlugin<State, any, PersistedState> { return class extends FlipperPlugin<State, any, PersistedState> {
static keyboardActions: KeyboardActions = ['clear', 'createPaste']; static keyboardActions: KeyboardActions = ['clear', 'createPaste'];
static id = id || ''; static id = id || '';
@@ -311,16 +310,17 @@ export default function createTableNativePlugin(id: string, title: string) {
static persistedStateReducer( static persistedStateReducer(
persistedState: PersistedState, persistedState: PersistedState,
method: 'updateRows' | 'clearTable', method: string,
data: Array<RowData> | undefined, data: Array<RowData> | undefined,
): Partial<PersistedState> { ): Partial<PersistedState> {
const methodEnum = method as 'updateRows' | 'clearTable';
const message: IncomingMessage = const message: IncomingMessage =
method === 'updateRows' methodEnum === 'updateRows'
? { ? {
method, method: methodEnum,
data: data || [], data: data || [],
} }
: {method}; : {method: methodEnum};
return this.typedPersistedStateReducer(persistedState, message); return this.typedPersistedStateReducer(persistedState, message);
} }