@eslint-react/shared 1.48.5 → 1.49.0-beta.0
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 +28 -23
- package/dist/index.d.ts +28 -23
- package/package.json +6 -6
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 | ((
|
|
664
|
+
type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | ((new (...arguments_: any[]) => unknown))
|
|
665
665
|
? T
|
|
666
|
-
: T extends
|
|
667
|
-
?
|
|
668
|
-
: T extends
|
|
669
|
-
?
|
|
670
|
-
: T extends
|
|
671
|
-
?
|
|
672
|
-
: T extends
|
|
673
|
-
?
|
|
674
|
-
: T extends
|
|
675
|
-
?
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
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
|
-
|
|
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 | ((
|
|
664
|
+
type _PartialDeep<T, Options extends Required<PartialDeepOptions>> = T extends BuiltIns | ((new (...arguments_: any[]) => unknown))
|
|
665
665
|
? T
|
|
666
|
-
: T extends
|
|
667
|
-
?
|
|
668
|
-
: T extends
|
|
669
|
-
?
|
|
670
|
-
: T extends
|
|
671
|
-
?
|
|
672
|
-
: T extends
|
|
673
|
-
?
|
|
674
|
-
: T extends
|
|
675
|
-
?
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "1.49.0-beta.0",
|
|
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.
|
|
39
|
-
"@zod/mini": "^4.0.0-beta.
|
|
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/
|
|
42
|
-
"@eslint-react/
|
|
41
|
+
"@eslint-react/kit": "1.49.0-beta.0",
|
|
42
|
+
"@eslint-react/eff": "1.49.0-beta.0"
|
|
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.
|
|
48
|
+
"type-fest": "^4.40.1",
|
|
49
49
|
"@local/configs": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|