mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
react-table: Fix type of useGetLatest (#41369)
* make it a generic function, with return type `() => T`
This commit is contained in:
parent
98f56b4936
commit
b87251eefd
2
types/react-table/index.d.ts
vendored
2
types/react-table/index.d.ts
vendored
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user