@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 | undefined, prev: S | undefined) => void;
13
+ onUpdate?: (next: Partialable<S>, prev: Partialable<S>) => void;
14
14
  };
15
15
  type UsedControlledState<T> = [T, Dispatch<SetStateAction<T>>];
16
16
  /**
@@ -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 : T;
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;
@@ -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 ReadonlyArray<unknown>>(value: Voidable<string | T>): First<T>;
6
+ declare function first<T extends Array<unknown>>(value: Voidable<string | T>): First<T>;
7
7
  export { first };
@@ -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 ReadonlyArray<unknown>>(value: Voidable<string | T>): Last<T>;
6
+ declare function last<T extends Array<unknown>>(value: Voidable<string | T>): Last<T>;
7
7
  export { last };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiszlab/relax",
3
- "version": "2.0.6-beta.10",
3
+ "version": "2.0.6-beta.12",
4
4
  "description": "react utils collection",
5
5
  "exports": {
6
6
  ".": {