From fee22aede9ff77677ee1834204a9fb1820d75b5e Mon Sep 17 00:00:00 2001 From: Ivan Tanev Date: Tue, 11 Feb 2020 08:48:48 -0800 Subject: [PATCH] Fix SortByFn is needlessly restrictive (#42270) --- types/react-table/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-table/index.d.ts b/types/react-table/index.d.ts index 2d360b7965..dde161e115 100644 --- a/types/react-table/index.d.ts +++ b/types/react-table/index.d.ts @@ -733,7 +733,7 @@ export interface UseSortByColumnProps { isSortedDesc: boolean | undefined; } -export type SortByFn = (rowA: Row, rowB: Row, columnId: IdType) => 0 | 1 | -1; +export type SortByFn = (rowA: Row, rowB: Row, columnId: IdType) => number; export type DefaultSortTypes = 'alphanumeric' | 'datetime' | 'basic';