@aiszlab/relax 2.0.6-beta.10 → 2.0.6-beta.12
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.
|
@@ -10,7 +10,7 @@ type UsingControlledState<S> = {
|
|
|
10
10
|
* @description
|
|
11
11
|
* value update callback
|
|
12
12
|
*/
|
|
13
|
-
onUpdate?: (next: S
|
|
13
|
+
onUpdate?: (next: Partialable<S>, prev: Partialable<S>) => void;
|
|
14
14
|
};
|
|
15
15
|
type UsedControlledState<T> = [T, Dispatch<SetStateAction<T>>];
|
|
16
16
|
/**
|
package/dist/types/last.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Last<T> = T extends null | undefined ? undefined : T extends string ? string : T extends [...Array<unknown>, infer D] ? D : T extends ReadonlyArray<infer I> ? I | undefined :
|
|
1
|
+
export type Last<T> = T extends null | undefined ? undefined : T extends string ? string : T extends [...Array<unknown>, infer D] ? D : T extends ReadonlyArray<infer I> ? I | undefined : never;
|
package/dist/utils/first.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { Voidable, First } from "@aiszlab/relax/types";
|
|
|
3
3
|
* @description
|
|
4
4
|
* first element
|
|
5
5
|
*/
|
|
6
|
-
declare function first<T extends
|
|
6
|
+
declare function first<T extends Array<unknown>>(value: Voidable<string | T>): First<T>;
|
|
7
7
|
export { first };
|
package/dist/utils/last.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { Voidable, Last } from "@aiszlab/relax/types";
|
|
|
3
3
|
* @description
|
|
4
4
|
* last element
|
|
5
5
|
*/
|
|
6
|
-
declare function last<T extends
|
|
6
|
+
declare function last<T extends Array<unknown>>(value: Voidable<string | T>): Last<T>;
|
|
7
7
|
export { last };
|