@eslint-react/shared 1.48.5 → 1.49.0-beta.1

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.
package/dist/index.d.mts CHANGED
@@ -661,27 +661,29 @@ const partialSettings: PartialDeep<Settings, {recurseIntoArrays: true}> = {
661
661
  type PartialDeep<T, Options extends PartialDeepOptions = {}> =
662
662
  _PartialDeep<T, ApplyDefaultOptions<PartialDeepOptions, DefaultPartialDeepOptions, Options>>;
663
663
 
664
- type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | (((...arguments_: any[]) => unknown)) | (new (...arguments_: any[]) => unknown)
664
+ type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | ((new (...arguments_: any[]) => unknown))
665
665
  ? T
666
- : T extends Map<infer KeyType, infer ValueType>
667
- ? PartialMapDeep<KeyType, ValueType, Options>
668
- : T extends Set<infer ItemType>
669
- ? PartialSetDeep<ItemType, Options>
670
- : T extends ReadonlyMap<infer KeyType, infer ValueType>
671
- ? PartialReadonlyMapDeep<KeyType, ValueType, Options>
672
- : T extends ReadonlySet<infer ItemType>
673
- ? PartialReadonlySetDeep<ItemType, Options>
674
- : T extends object
675
- ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
676
- ? Options['recurseIntoArrays'] extends true
677
- ? ItemType[] extends T // Test for arrays (non-tuples) specifically
678
- ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
679
- ? ReadonlyArray<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
680
- : Array<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
681
- : PartialObjectDeep<T, Options> // Tuples behave properly
682
- : T // If they don't opt into array testing, just use the original type
683
- : PartialObjectDeep<T, Options>
684
- : unknown;
666
+ : IsNever<keyof T> extends true // For functions with no properties
667
+ ? T
668
+ : T extends Map<infer KeyType, infer ValueType>
669
+ ? PartialMapDeep<KeyType, ValueType, Options>
670
+ : T extends Set<infer ItemType>
671
+ ? PartialSetDeep<ItemType, Options>
672
+ : T extends ReadonlyMap<infer KeyType, infer ValueType>
673
+ ? PartialReadonlyMapDeep<KeyType, ValueType, Options>
674
+ : T extends ReadonlySet<infer ItemType>
675
+ ? PartialReadonlySetDeep<ItemType, Options>
676
+ : T extends object
677
+ ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
678
+ ? Options['recurseIntoArrays'] extends true
679
+ ? ItemType[] extends T // Test for arrays (non-tuples) specifically
680
+ ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
681
+ ? ReadonlyArray<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
682
+ : Array<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
683
+ : PartialObjectDeep<T, Options> // Tuples behave properly
684
+ : T // If they don't opt into array testing, just use the original type
685
+ : PartialObjectDeep<T, Options>
686
+ : unknown;
685
687
 
686
688
  /**
687
689
  Same as `PartialDeep`, but accepts only `Map`s and as inputs. Internal helper for `PartialDeep`.
@@ -706,9 +708,12 @@ type PartialReadonlySetDeep<T, Options extends Required<PartialDeepOptions>> = {
706
708
  /**
707
709
  Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
708
710
  */
709
- type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> = {
710
- [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
711
- };
711
+ type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> =
712
+ (ObjectType extends (...arguments_: any) => unknown
713
+ ? (...arguments_: Parameters<ObjectType>) => ReturnType<ObjectType>
714
+ : {}) & ({
715
+ [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
716
+ });
712
717
 
713
718
  declare const CustomComponentPropSchema: z.ZodMiniObject<{
714
719
  /**
package/dist/index.d.ts CHANGED
@@ -661,27 +661,29 @@ const partialSettings: PartialDeep<Settings, {recurseIntoArrays: true}> = {
661
661
  type PartialDeep<T, Options extends PartialDeepOptions = {}> =
662
662
  _PartialDeep<T, ApplyDefaultOptions<PartialDeepOptions, DefaultPartialDeepOptions, Options>>;
663
663
 
664
- type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | (((...arguments_: any[]) => unknown)) | (new (...arguments_: any[]) => unknown)
664
+ type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | ((new (...arguments_: any[]) => unknown))
665
665
  ? T
666
- : T extends Map<infer KeyType, infer ValueType>
667
- ? PartialMapDeep<KeyType, ValueType, Options>
668
- : T extends Set<infer ItemType>
669
- ? PartialSetDeep<ItemType, Options>
670
- : T extends ReadonlyMap<infer KeyType, infer ValueType>
671
- ? PartialReadonlyMapDeep<KeyType, ValueType, Options>
672
- : T extends ReadonlySet<infer ItemType>
673
- ? PartialReadonlySetDeep<ItemType, Options>
674
- : T extends object
675
- ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
676
- ? Options['recurseIntoArrays'] extends true
677
- ? ItemType[] extends T // Test for arrays (non-tuples) specifically
678
- ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
679
- ? ReadonlyArray<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
680
- : Array<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
681
- : PartialObjectDeep<T, Options> // Tuples behave properly
682
- : T // If they don't opt into array testing, just use the original type
683
- : PartialObjectDeep<T, Options>
684
- : unknown;
666
+ : IsNever<keyof T> extends true // For functions with no properties
667
+ ? T
668
+ : T extends Map<infer KeyType, infer ValueType>
669
+ ? PartialMapDeep<KeyType, ValueType, Options>
670
+ : T extends Set<infer ItemType>
671
+ ? PartialSetDeep<ItemType, Options>
672
+ : T extends ReadonlyMap<infer KeyType, infer ValueType>
673
+ ? PartialReadonlyMapDeep<KeyType, ValueType, Options>
674
+ : T extends ReadonlySet<infer ItemType>
675
+ ? PartialReadonlySetDeep<ItemType, Options>
676
+ : T extends object
677
+ ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
678
+ ? Options['recurseIntoArrays'] extends true
679
+ ? ItemType[] extends T // Test for arrays (non-tuples) specifically
680
+ ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
681
+ ? ReadonlyArray<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
682
+ : Array<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
683
+ : PartialObjectDeep<T, Options> // Tuples behave properly
684
+ : T // If they don't opt into array testing, just use the original type
685
+ : PartialObjectDeep<T, Options>
686
+ : unknown;
685
687
 
686
688
  /**
687
689
  Same as `PartialDeep`, but accepts only `Map`s and as inputs. Internal helper for `PartialDeep`.
@@ -706,9 +708,12 @@ type PartialReadonlySetDeep<T, Options extends Required<PartialDeepOptions>> = {
706
708
  /**
707
709
  Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
708
710
  */
709
- type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> = {
710
- [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
711
- };
711
+ type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> =
712
+ (ObjectType extends (...arguments_: any) => unknown
713
+ ? (...arguments_: Parameters<ObjectType>) => ReturnType<ObjectType>
714
+ : {}) & ({
715
+ [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
716
+ });
712
717
 
713
718
  declare const CustomComponentPropSchema: z.ZodMiniObject<{
714
719
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.48.5",
3
+ "version": "1.49.0-beta.1",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -35,17 +35,17 @@
35
35
  "./package.json"
36
36
  ],
37
37
  "dependencies": {
38
- "@typescript-eslint/utils": "^8.31.0",
39
- "@zod/mini": "^4.0.0-beta.20250424T163858",
38
+ "@typescript-eslint/utils": "^8.31.1",
39
+ "@zod/mini": "^4.0.0-beta.20250503T014749",
40
40
  "ts-pattern": "^5.7.0",
41
- "@eslint-react/eff": "1.48.5",
42
- "@eslint-react/kit": "1.48.5"
41
+ "@eslint-react/eff": "1.49.0-beta.1",
42
+ "@eslint-react/kit": "1.49.0-beta.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@tsconfig/node22": "^22.0.1",
46
46
  "@types/picomatch": "^4.0.0",
47
47
  "tsup": "^8.4.0",
48
- "type-fest": "^4.40.0",
48
+ "type-fest": "^4.40.1",
49
49
  "@local/configs": "0.0.0"
50
50
  },
51
51
  "engines": {