@eslint-react/shared 2.0.0-next.7 → 2.0.0-next.8

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +28 -23
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -669,27 +669,29 @@ const partialSettings: PartialDeep<Settings, {recurseIntoArrays: true}> = {
669
669
  type PartialDeep<T, Options extends PartialDeepOptions = {}> =
670
670
  _PartialDeep<T, ApplyDefaultOptions<PartialDeepOptions, DefaultPartialDeepOptions, Options>>;
671
671
 
672
- type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | (((...arguments_: any[]) => unknown)) | (new (...arguments_: any[]) => unknown)
672
+ type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | ((new (...arguments_: any[]) => unknown))
673
673
  ? T
674
- : T extends Map<infer KeyType, infer ValueType>
675
- ? PartialMapDeep<KeyType, ValueType, Options>
676
- : T extends Set<infer ItemType>
677
- ? PartialSetDeep<ItemType, Options>
678
- : T extends ReadonlyMap<infer KeyType, infer ValueType>
679
- ? PartialReadonlyMapDeep<KeyType, ValueType, Options>
680
- : T extends ReadonlySet<infer ItemType>
681
- ? PartialReadonlySetDeep<ItemType, Options>
682
- : T extends object
683
- ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
684
- ? Options['recurseIntoArrays'] extends true
685
- ? ItemType[] extends T // Test for arrays (non-tuples) specifically
686
- ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
687
- ? ReadonlyArray<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
688
- : Array<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
689
- : PartialObjectDeep<T, Options> // Tuples behave properly
690
- : T // If they don't opt into array testing, just use the original type
691
- : PartialObjectDeep<T, Options>
692
- : unknown;
674
+ : IsNever<keyof T> extends true // For functions with no properties
675
+ ? T
676
+ : T extends Map<infer KeyType, infer ValueType>
677
+ ? PartialMapDeep<KeyType, ValueType, Options>
678
+ : T extends Set<infer ItemType>
679
+ ? PartialSetDeep<ItemType, Options>
680
+ : T extends ReadonlyMap<infer KeyType, infer ValueType>
681
+ ? PartialReadonlyMapDeep<KeyType, ValueType, Options>
682
+ : T extends ReadonlySet<infer ItemType>
683
+ ? PartialReadonlySetDeep<ItemType, Options>
684
+ : T extends object
685
+ ? T extends ReadonlyArray<infer ItemType> // Test for arrays/tuples, per https://github.com/microsoft/TypeScript/issues/35156
686
+ ? Options['recurseIntoArrays'] extends true
687
+ ? ItemType[] extends T // Test for arrays (non-tuples) specifically
688
+ ? readonly ItemType[] extends T // Differentiate readonly and mutable arrays
689
+ ? ReadonlyArray<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
690
+ : Array<_PartialDeep<Options['allowUndefinedInNonTupleArrays'] extends false ? ItemType : ItemType | undefined, Options>>
691
+ : PartialObjectDeep<T, Options> // Tuples behave properly
692
+ : T // If they don't opt into array testing, just use the original type
693
+ : PartialObjectDeep<T, Options>
694
+ : unknown;
693
695
 
694
696
  /**
695
697
  Same as `PartialDeep`, but accepts only `Map`s and as inputs. Internal helper for `PartialDeep`.
@@ -714,9 +716,12 @@ type PartialReadonlySetDeep<T, Options extends Required<PartialDeepOptions>> = {
714
716
  /**
715
717
  Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
716
718
  */
717
- type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> = {
718
- [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
719
- };
719
+ type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> =
720
+ (ObjectType extends (...arguments_: any) => unknown
721
+ ? (...arguments_: Parameters<ObjectType>) => ReturnType<ObjectType>
722
+ : {}) & ({
723
+ [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
724
+ });
720
725
 
721
726
  declare const CustomComponentPropSchema: z.ZodMiniObject<{
722
727
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "2.0.0-next.7",
3
+ "version": "2.0.0-next.8",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -30,14 +30,14 @@
30
30
  "@typescript-eslint/utils": "^8.31.0",
31
31
  "@zod/mini": "^4.0.0-beta.20250424T163858",
32
32
  "ts-pattern": "^5.7.0",
33
- "@eslint-react/eff": "2.0.0-next.7",
34
- "@eslint-react/kit": "2.0.0-next.7"
33
+ "@eslint-react/eff": "2.0.0-next.8",
34
+ "@eslint-react/kit": "2.0.0-next.8"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@tsconfig/node22": "^22.0.1",
38
38
  "@types/picomatch": "^4.0.0",
39
39
  "tsup": "^8.4.0",
40
- "type-fest": "^4.40.0",
40
+ "type-fest": "^4.40.1",
41
41
  "@local/configs": "0.0.0"
42
42
  },
43
43
  "engines": {