react-table: Fix type of useGetLatest (#41369)

* make it a generic function, with return type `() => T`
This commit is contained in:
Andros Rosa Llop
2020-01-03 15:25:13 -08:00
committed by Ryan Cavanaugh
parent 98f56b4936
commit b87251eefd
+1 -1
View File
@@ -791,7 +791,7 @@ export function functionalUpdate<D extends object = {}>(
old: Partial<TableState<D>>,
): Partial<TableState<D>>;
export function useGetLatest(obj: any): any;
export function useGetLatest<T>(obj: T): () => T;
export function safeUseLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;