@pdg/react-hook 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
2
|
export default function useAutoUpdateLayoutRefState<T>(state: Exclude<T, (...args: any[]) => any>): [MutableRefObject<T>, T, Dispatch<SetStateAction<T>>];
|
|
3
|
+
export default function useAutoUpdateLayoutRefState<T>(state: Exclude<T, (...args: any[]) => any>, callback: (state: T) => T): [MutableRefObject<T>, T, Dispatch<SetStateAction<T>>];
|
|
3
4
|
export default function useAutoUpdateLayoutRefState<T = never, StateT = never>(state: Exclude<StateT, (...args: any[]) => any>, callback: (state: T | StateT) => T extends never ? StateT : T): [
|
|
4
5
|
MutableRefObject<T extends never ? StateT : T>,
|
|
5
6
|
T extends never ? StateT : T,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
export default function useAutoUpdateLayoutState<T>(state: Exclude<T, (...args: any[]) => any>): [T, Dispatch<SetStateAction<T>>];
|
|
3
|
+
export default function useAutoUpdateLayoutState<T>(state: Exclude<T, (...args: any[]) => any>, callback: (state: T) => T): [T, Dispatch<SetStateAction<T>>];
|
|
3
4
|
export default function useAutoUpdateLayoutState<T = never, StateT = never>(state: Exclude<StateT, (...args: any[]) => any>, callback: (state: T | StateT) => T extends never ? StateT : T): [T extends never ? StateT : T, Dispatch<SetStateAction<T extends never ? StateT : T>>];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
|
2
2
|
export default function useAutoUpdateRefState<T>(state: Exclude<T, (...args: any[]) => any>): [MutableRefObject<T>, T, Dispatch<SetStateAction<T>>];
|
|
3
|
+
export default function useAutoUpdateRefState<T>(state: Exclude<T, (...args: any[]) => any>, callback: (state: T) => T): [MutableRefObject<T>, T, Dispatch<SetStateAction<T>>];
|
|
3
4
|
export default function useAutoUpdateRefState<T = never, StateT = never>(state: Exclude<StateT, (...args: any[]) => any>, callback: (state: T | StateT) => T extends never ? StateT : T): [
|
|
4
5
|
MutableRefObject<T extends never ? StateT : T>,
|
|
5
6
|
T extends never ? StateT : T,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
export default function useAutoUpdateState<T>(state: Exclude<T, (...args: any[]) => any>): [T, Dispatch<SetStateAction<T>>];
|
|
3
|
+
export default function useAutoUpdateState<T>(state: Exclude<T, (...args: any[]) => any>, callback: (state: T) => T): [T, Dispatch<SetStateAction<T>>];
|
|
3
4
|
export default function useAutoUpdateState<T = never, StateT = never>(state: Exclude<StateT, (...args: any[]) => any>, callback: (state: T | StateT) => T extends never ? StateT : T): [T extends never ? StateT : T, Dispatch<SetStateAction<T extends never ? StateT : T>>];
|