type-fest 4.40.1 → 5.0.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.
Files changed (156) hide show
  1. package/index.d.ts +174 -152
  2. package/package.json +20 -44
  3. package/readme.md +46 -68
  4. package/source/all-extend.d.ts +115 -0
  5. package/source/all-union-fields.d.ts +12 -12
  6. package/source/and.d.ts +60 -8
  7. package/source/array-slice.d.ts +11 -11
  8. package/source/array-splice.d.ts +4 -4
  9. package/source/array-tail.d.ts +40 -48
  10. package/source/arrayable.d.ts +2 -2
  11. package/source/asyncify.d.ts +1 -1
  12. package/source/basic.d.ts +1 -33
  13. package/source/camel-case.d.ts +6 -6
  14. package/source/camel-cased-properties-deep.d.ts +7 -7
  15. package/source/camel-cased-properties.d.ts +4 -4
  16. package/source/characters.d.ts +60 -0
  17. package/source/conditional-except.d.ts +4 -4
  18. package/source/conditional-keys.d.ts +33 -19
  19. package/source/conditional-pick-deep.d.ts +9 -9
  20. package/source/conditional-pick.d.ts +3 -3
  21. package/source/conditional-simplify-deep.d.ts +71 -0
  22. package/source/conditional-simplify.d.ts +36 -20
  23. package/source/delimiter-case.d.ts +9 -12
  24. package/source/delimiter-cased-properties-deep.d.ts +4 -4
  25. package/source/delimiter-cased-properties.d.ts +3 -3
  26. package/source/distributed-omit.d.ts +1 -1
  27. package/source/distributed-pick.d.ts +1 -1
  28. package/source/enforce-optional.d.ts +1 -1
  29. package/source/entries.d.ts +1 -1
  30. package/source/exact.d.ts +6 -6
  31. package/source/except.d.ts +2 -2
  32. package/source/exclude-strict.d.ts +45 -0
  33. package/source/extends-strict.d.ts +42 -0
  34. package/source/extract-strict.d.ts +45 -0
  35. package/source/find-global-type.d.ts +1 -1
  36. package/source/fixed-length-array.d.ts +2 -2
  37. package/source/get.d.ts +15 -14
  38. package/source/globals/index.d.ts +1 -0
  39. package/source/{observable-like.d.ts → globals/observable-like.d.ts} +10 -0
  40. package/source/greater-than-or-equal.d.ts +1 -1
  41. package/source/greater-than.d.ts +37 -32
  42. package/source/has-optional-keys.d.ts +1 -1
  43. package/source/has-readonly-keys.d.ts +1 -1
  44. package/source/has-required-keys.d.ts +1 -1
  45. package/source/has-writable-keys.d.ts +1 -1
  46. package/source/if-any.d.ts +3 -1
  47. package/source/if-empty-object.d.ts +3 -1
  48. package/source/if-never.d.ts +3 -1
  49. package/source/if-null.d.ts +3 -1
  50. package/source/if-unknown.d.ts +3 -1
  51. package/source/if.d.ts +65 -0
  52. package/source/includes.d.ts +1 -1
  53. package/source/int-closed-range.d.ts +2 -2
  54. package/source/int-range.d.ts +6 -4
  55. package/source/internal/array.d.ts +54 -22
  56. package/source/internal/characters.d.ts +0 -4
  57. package/source/internal/index.d.ts +8 -8
  58. package/source/internal/keys.d.ts +24 -23
  59. package/source/internal/numeric.d.ts +45 -15
  60. package/source/internal/object.d.ts +58 -29
  61. package/source/internal/string.d.ts +4 -14
  62. package/source/internal/tuple.d.ts +4 -4
  63. package/source/internal/type.d.ts +42 -25
  64. package/source/is-any.d.ts +0 -4
  65. package/source/is-float.d.ts +1 -3
  66. package/source/is-integer.d.ts +4 -4
  67. package/source/is-literal.d.ts +44 -28
  68. package/source/is-lowercase.d.ts +36 -0
  69. package/source/is-nullable.d.ts +28 -0
  70. package/source/is-optional-key-of.d.ts +49 -0
  71. package/source/is-optional.d.ts +26 -0
  72. package/source/is-readonly-key-of.d.ts +53 -0
  73. package/source/is-required-key-of.d.ts +49 -0
  74. package/source/is-tuple.d.ts +15 -14
  75. package/source/is-undefined.d.ts +20 -0
  76. package/source/is-union.d.ts +37 -0
  77. package/source/is-unknown.d.ts +1 -1
  78. package/source/is-uppercase.d.ts +36 -0
  79. package/source/is-writable-key-of.d.ts +49 -0
  80. package/source/json-value.d.ts +31 -0
  81. package/source/jsonifiable.d.ts +1 -1
  82. package/source/jsonify.d.ts +18 -14
  83. package/source/kebab-case.d.ts +3 -3
  84. package/source/kebab-cased-properties-deep.d.ts +4 -4
  85. package/source/kebab-cased-properties.d.ts +4 -4
  86. package/source/{string-key-of.d.ts → key-as-string.d.ts} +5 -5
  87. package/source/keys-of-union.d.ts +1 -1
  88. package/source/less-than-or-equal.d.ts +1 -1
  89. package/source/less-than.d.ts +6 -2
  90. package/source/literal-to-primitive-deep.d.ts +2 -2
  91. package/source/literal-union.d.ts +1 -1
  92. package/source/merge-deep.d.ts +43 -34
  93. package/source/merge.d.ts +5 -5
  94. package/source/multidimensional-array.d.ts +2 -2
  95. package/source/multidimensional-readonly-array.d.ts +2 -2
  96. package/source/non-empty-object.d.ts +2 -2
  97. package/source/numeric.d.ts +4 -4
  98. package/source/omit-deep.d.ts +11 -11
  99. package/source/opaque.d.ts +1 -1
  100. package/source/optional-keys-of.d.ts +10 -5
  101. package/source/or.d.ts +67 -7
  102. package/source/override-properties.d.ts +1 -1
  103. package/source/package-json.d.ts +78 -78
  104. package/source/partial-deep.d.ts +22 -21
  105. package/source/partial-on-undefined-deep.d.ts +5 -4
  106. package/source/pascal-case.d.ts +13 -6
  107. package/source/pascal-cased-properties-deep.d.ts +11 -3
  108. package/source/pascal-cased-properties.d.ts +7 -3
  109. package/source/paths.d.ts +42 -39
  110. package/source/pick-deep.d.ts +6 -6
  111. package/source/readonly-deep.d.ts +2 -2
  112. package/source/readonly-keys-of.d.ts +10 -4
  113. package/source/remove-prefix.d.ts +128 -0
  114. package/source/replace.d.ts +1 -1
  115. package/source/require-all-or-none.d.ts +12 -2
  116. package/source/require-at-least-one.d.ts +16 -2
  117. package/source/require-exactly-one.d.ts +12 -0
  118. package/source/require-one-or-none.d.ts +13 -3
  119. package/source/required-deep.d.ts +26 -32
  120. package/source/required-keys-of.d.ts +4 -4
  121. package/source/schema.d.ts +74 -74
  122. package/source/screaming-snake-case.d.ts +4 -4
  123. package/source/set-field-type.d.ts +2 -2
  124. package/source/set-non-nullable-deep.d.ts +83 -0
  125. package/source/set-optional.d.ts +11 -6
  126. package/source/set-parameter-type.d.ts +7 -7
  127. package/source/set-readonly.d.ts +12 -10
  128. package/source/set-required-deep.d.ts +12 -12
  129. package/source/set-required.d.ts +15 -9
  130. package/source/set-return-type.d.ts +1 -1
  131. package/source/shared-union-fields-deep.d.ts +10 -10
  132. package/source/shared-union-fields.d.ts +5 -4
  133. package/source/simplify-deep.d.ts +3 -3
  134. package/source/single-key-object.d.ts +4 -3
  135. package/source/snake-case.d.ts +3 -3
  136. package/source/snake-cased-properties-deep.d.ts +4 -4
  137. package/source/snake-cased-properties.d.ts +4 -4
  138. package/source/split.d.ts +9 -9
  139. package/source/spread.d.ts +3 -3
  140. package/source/string-repeat.d.ts +2 -2
  141. package/source/string-slice.d.ts +3 -3
  142. package/source/structured-cloneable.d.ts +25 -25
  143. package/source/subtract.d.ts +3 -3
  144. package/source/sum.d.ts +3 -3
  145. package/source/tagged-union.d.ts +1 -1
  146. package/source/tagged.d.ts +3 -1
  147. package/source/trim.d.ts +1 -1
  148. package/source/tsconfig-json.d.ts +2 -1
  149. package/source/tuple-to-object.d.ts +5 -4
  150. package/source/undefined-on-partial-deep.d.ts +1 -1
  151. package/source/union-to-tuple.d.ts +2 -2
  152. package/source/value-of.d.ts +1 -1
  153. package/source/words.d.ts +5 -5
  154. package/source/writable-deep.d.ts +1 -1
  155. package/source/writable-keys-of.d.ts +5 -6
  156. package/source/writable.d.ts +4 -4
package/index.d.ts CHANGED
@@ -1,78 +1,80 @@
1
1
  // Basic
2
- export * from './source/primitive';
3
- export * from './source/typed-array';
4
- export * from './source/basic';
5
- export * from './source/observable-like';
2
+ export type * from './source/primitive.d.ts';
3
+ export type * from './source/typed-array.d.ts';
4
+ export type * from './source/basic.d.ts';
5
+ export type * from './source/json-value.d.ts';
6
+ export type * from './source/characters.d.ts';
6
7
 
7
8
  // Utilities
8
- export type {KeysOfUnion} from './source/keys-of-union';
9
- export type {DistributedOmit} from './source/distributed-omit';
10
- export type {DistributedPick} from './source/distributed-pick';
11
- export type {EmptyObject, IsEmptyObject} from './source/empty-object';
12
- export type {IfEmptyObject} from './source/if-empty-object';
13
- export type {NonEmptyObject} from './source/non-empty-object';
14
- export type {NonEmptyString} from './source/non-empty-string';
15
- export type {UnknownRecord} from './source/unknown-record';
16
- export type {UnknownArray} from './source/unknown-array';
17
- export type {UnknownSet} from './source/unknown-set';
18
- export type {UnknownMap} from './source/unknown-map';
19
- export type {Except} from './source/except';
20
- export type {TaggedUnion} from './source/tagged-union';
21
- export type {Writable} from './source/writable';
22
- export type {WritableDeep} from './source/writable-deep';
23
- export type {Merge} from './source/merge';
24
- export type {MergeDeep, MergeDeepOptions} from './source/merge-deep';
25
- export type {MergeExclusive} from './source/merge-exclusive';
26
- export type {RequireAtLeastOne} from './source/require-at-least-one';
27
- export type {RequireExactlyOne} from './source/require-exactly-one';
28
- export type {RequireAllOrNone} from './source/require-all-or-none';
29
- export type {RequireOneOrNone} from './source/require-one-or-none';
30
- export type {SingleKeyObject} from './source/single-key-object';
31
- export type {OmitIndexSignature} from './source/omit-index-signature';
32
- export type {PickIndexSignature} from './source/pick-index-signature';
33
- export type {PartialDeep, PartialDeepOptions} from './source/partial-deep';
34
- export type {RequiredDeep} from './source/required-deep';
35
- export type {PickDeep} from './source/pick-deep';
36
- export type {OmitDeep} from './source/omit-deep';
37
- export type {PartialOnUndefinedDeep, PartialOnUndefinedDeepOptions} from './source/partial-on-undefined-deep';
38
- export type {UndefinedOnPartialDeep} from './source/undefined-on-partial-deep';
39
- export type {ReadonlyDeep} from './source/readonly-deep';
40
- export type {LiteralUnion} from './source/literal-union';
41
- export type {Promisable} from './source/promisable';
42
- export type {Arrayable} from './source/arrayable';
43
- export type {Opaque, UnwrapOpaque, Tagged, GetTagMetadata, UnwrapTagged} from './source/tagged';
44
- export type {InvariantOf} from './source/invariant-of';
45
- export type {SetOptional} from './source/set-optional';
46
- export type {SetReadonly} from './source/set-readonly';
47
- export type {SetRequired} from './source/set-required';
48
- export type {SetRequiredDeep} from './source/set-required-deep';
49
- export type {SetNonNullable} from './source/set-non-nullable';
50
- export type {ValueOf} from './source/value-of';
51
- export type {AsyncReturnType} from './source/async-return-type';
52
- export type {ConditionalExcept} from './source/conditional-except';
53
- export type {ConditionalKeys} from './source/conditional-keys';
54
- export type {ConditionalPick} from './source/conditional-pick';
55
- export type {ConditionalPickDeep, ConditionalPickDeepOptions} from './source/conditional-pick-deep';
56
- export type {UnionToIntersection} from './source/union-to-intersection';
57
- export type {Stringified} from './source/stringified';
58
- export type {StringSlice} from './source/string-slice';
59
- export type {FixedLengthArray} from './source/fixed-length-array';
60
- export type {MultidimensionalArray} from './source/multidimensional-array';
61
- export type {MultidimensionalReadonlyArray} from './source/multidimensional-readonly-array';
62
- export type {IterableElement} from './source/iterable-element';
63
- export type {Entry} from './source/entry';
64
- export type {Entries} from './source/entries';
65
- export type {SetReturnType} from './source/set-return-type';
66
- export type {SetParameterType} from './source/set-parameter-type';
67
- export type {Asyncify} from './source/asyncify';
68
- export type {Simplify} from './source/simplify';
69
- export type {SimplifyDeep} from './source/simplify-deep';
70
- export type {Jsonify} from './source/jsonify';
71
- export type {Jsonifiable} from './source/jsonifiable';
72
- export type {StructuredCloneable} from './source/structured-cloneable';
73
- export type {Schema, SchemaOptions} from './source/schema';
74
- export type {LiteralToPrimitive} from './source/literal-to-primitive';
75
- export type {LiteralToPrimitiveDeep} from './source/literal-to-primitive-deep';
9
+ export type {KeysOfUnion} from './source/keys-of-union.d.ts';
10
+ export type {DistributedOmit} from './source/distributed-omit.d.ts';
11
+ export type {DistributedPick} from './source/distributed-pick.d.ts';
12
+ export type {EmptyObject, IsEmptyObject} from './source/empty-object.d.ts';
13
+ export type {IfEmptyObject} from './source/if-empty-object.d.ts';
14
+ export type {NonEmptyObject} from './source/non-empty-object.d.ts';
15
+ export type {NonEmptyString} from './source/non-empty-string.d.ts';
16
+ export type {UnknownRecord} from './source/unknown-record.d.ts';
17
+ export type {UnknownArray} from './source/unknown-array.d.ts';
18
+ export type {UnknownSet} from './source/unknown-set.d.ts';
19
+ export type {UnknownMap} from './source/unknown-map.d.ts';
20
+ export type {Except} from './source/except.d.ts';
21
+ export type {TaggedUnion} from './source/tagged-union.d.ts';
22
+ export type {Writable} from './source/writable.d.ts';
23
+ export type {WritableDeep} from './source/writable-deep.d.ts';
24
+ export type {Merge} from './source/merge.d.ts';
25
+ export type {MergeDeep, MergeDeepOptions} from './source/merge-deep.d.ts';
26
+ export type {MergeExclusive} from './source/merge-exclusive.d.ts';
27
+ export type {RequireAtLeastOne} from './source/require-at-least-one.d.ts';
28
+ export type {RequireExactlyOne} from './source/require-exactly-one.d.ts';
29
+ export type {RequireAllOrNone} from './source/require-all-or-none.d.ts';
30
+ export type {RequireOneOrNone} from './source/require-one-or-none.d.ts';
31
+ export type {SingleKeyObject} from './source/single-key-object.d.ts';
32
+ export type {OmitIndexSignature} from './source/omit-index-signature.d.ts';
33
+ export type {PickIndexSignature} from './source/pick-index-signature.d.ts';
34
+ export type {PartialDeep, PartialDeepOptions} from './source/partial-deep.d.ts';
35
+ export type {RequiredDeep} from './source/required-deep.d.ts';
36
+ export type {PickDeep} from './source/pick-deep.d.ts';
37
+ export type {OmitDeep} from './source/omit-deep.d.ts';
38
+ export type {PartialOnUndefinedDeep, PartialOnUndefinedDeepOptions} from './source/partial-on-undefined-deep.d.ts';
39
+ export type {UndefinedOnPartialDeep} from './source/undefined-on-partial-deep.d.ts';
40
+ export type {ReadonlyDeep} from './source/readonly-deep.d.ts';
41
+ export type {LiteralUnion} from './source/literal-union.d.ts';
42
+ export type {Promisable} from './source/promisable.d.ts';
43
+ export type {Arrayable} from './source/arrayable.d.ts';
44
+ export type {Opaque, UnwrapOpaque, Tagged, GetTagMetadata, UnwrapTagged} from './source/tagged.d.ts';
45
+ export type {InvariantOf} from './source/invariant-of.d.ts';
46
+ export type {SetOptional} from './source/set-optional.d.ts';
47
+ export type {SetReadonly} from './source/set-readonly.d.ts';
48
+ export type {SetRequired} from './source/set-required.d.ts';
49
+ export type {SetRequiredDeep} from './source/set-required-deep.d.ts';
50
+ export type {SetNonNullable} from './source/set-non-nullable.d.ts';
51
+ export type {SetNonNullableDeep} from './source/set-non-nullable-deep.d.ts';
52
+ export type {ValueOf} from './source/value-of.d.ts';
53
+ export type {AsyncReturnType} from './source/async-return-type.d.ts';
54
+ export type {ConditionalExcept} from './source/conditional-except.d.ts';
55
+ export type {ConditionalKeys} from './source/conditional-keys.d.ts';
56
+ export type {ConditionalPick} from './source/conditional-pick.d.ts';
57
+ export type {ConditionalPickDeep, ConditionalPickDeepOptions} from './source/conditional-pick-deep.d.ts';
58
+ export type {UnionToIntersection} from './source/union-to-intersection.d.ts';
59
+ export type {Stringified} from './source/stringified.d.ts';
60
+ export type {StringSlice} from './source/string-slice.d.ts';
61
+ export type {FixedLengthArray} from './source/fixed-length-array.d.ts';
62
+ export type {MultidimensionalArray} from './source/multidimensional-array.d.ts';
63
+ export type {MultidimensionalReadonlyArray} from './source/multidimensional-readonly-array.d.ts';
64
+ export type {IterableElement} from './source/iterable-element.d.ts';
65
+ export type {Entry} from './source/entry.d.ts';
66
+ export type {Entries} from './source/entries.d.ts';
67
+ export type {SetReturnType} from './source/set-return-type.d.ts';
68
+ export type {SetParameterType} from './source/set-parameter-type.d.ts';
69
+ export type {Asyncify} from './source/asyncify.d.ts';
70
+ export type {Simplify} from './source/simplify.d.ts';
71
+ export type {SimplifyDeep} from './source/simplify-deep.d.ts';
72
+ export type {Jsonify} from './source/jsonify.d.ts';
73
+ export type {Jsonifiable} from './source/jsonifiable.d.ts';
74
+ export type {StructuredCloneable} from './source/structured-cloneable.d.ts';
75
+ export type {Schema, SchemaOptions} from './source/schema.d.ts';
76
+ export type {LiteralToPrimitive} from './source/literal-to-primitive.d.ts';
77
+ export type {LiteralToPrimitiveDeep} from './source/literal-to-primitive-deep.d.ts';
76
78
  export type {
77
79
  PositiveInfinity,
78
80
  NegativeInfinity,
@@ -85,93 +87,113 @@ export type {
85
87
  NegativeInteger,
86
88
  NonNegativeInteger,
87
89
  IsNegative,
88
- } from './source/numeric';
89
- export type {GreaterThan} from './source/greater-than';
90
- export type {GreaterThanOrEqual} from './source/greater-than-or-equal';
91
- export type {LessThan} from './source/less-than';
92
- export type {LessThanOrEqual} from './source/less-than-or-equal';
93
- export type {Sum} from './source/sum';
94
- export type {Subtract} from './source/subtract';
95
- export type {StringKeyOf} from './source/string-key-of';
96
- export type {Exact} from './source/exact';
97
- export type {ReadonlyTuple} from './source/readonly-tuple';
98
- export type {OptionalKeysOf} from './source/optional-keys-of';
99
- export type {OverrideProperties} from './source/override-properties';
100
- export type {HasOptionalKeys} from './source/has-optional-keys';
101
- export type {RequiredKeysOf} from './source/required-keys-of';
102
- export type {HasRequiredKeys} from './source/has-required-keys';
103
- export type {ReadonlyKeysOf} from './source/readonly-keys-of';
104
- export type {HasReadonlyKeys} from './source/has-readonly-keys';
105
- export type {WritableKeysOf} from './source/writable-keys-of';
106
- export type {HasWritableKeys} from './source/has-writable-keys';
107
- export type {Spread} from './source/spread';
108
- export type {IsInteger} from './source/is-integer';
109
- export type {IsFloat} from './source/is-float';
110
- export type {TupleToObject} from './source/tuple-to-object';
111
- export type {TupleToUnion} from './source/tuple-to-union';
112
- export type {UnionToTuple} from './source/union-to-tuple';
113
- export type {IntRange} from './source/int-range';
114
- export type {IntClosedRange} from './source/int-closed-range';
115
- export type {IsEqual} from './source/is-equal';
90
+ } from './source/numeric.d.ts';
91
+ export type {GreaterThan} from './source/greater-than.d.ts';
92
+ export type {GreaterThanOrEqual} from './source/greater-than-or-equal.d.ts';
93
+ export type {LessThan} from './source/less-than.d.ts';
94
+ export type {LessThanOrEqual} from './source/less-than-or-equal.d.ts';
95
+ export type {Sum} from './source/sum.d.ts';
96
+ export type {Subtract} from './source/subtract.d.ts';
97
+ export type {KeyAsString} from './source/key-as-string.d.ts';
98
+ export type {Exact} from './source/exact.d.ts';
99
+ export type {ReadonlyTuple} from './source/readonly-tuple.d.ts';
100
+ export type {OverrideProperties} from './source/override-properties.d.ts';
101
+ export type {OptionalKeysOf} from './source/optional-keys-of.d.ts';
102
+ export type {IsOptionalKeyOf} from './source/is-optional-key-of.d.ts';
103
+ export type {HasOptionalKeys} from './source/has-optional-keys.d.ts';
104
+ export type {RequiredKeysOf} from './source/required-keys-of.d.ts';
105
+ export type {IsRequiredKeyOf} from './source/is-required-key-of.d.ts';
106
+ export type {HasRequiredKeys} from './source/has-required-keys.d.ts';
107
+ export type {ReadonlyKeysOf} from './source/readonly-keys-of.d.ts';
108
+ export type {IsReadonlyKeyOf} from './source/is-readonly-key-of.d.ts';
109
+ export type {HasReadonlyKeys} from './source/has-readonly-keys.d.ts';
110
+ export type {WritableKeysOf} from './source/writable-keys-of.d.ts';
111
+ export type {IsWritableKeyOf} from './source/is-writable-key-of.d.ts';
112
+ export type {HasWritableKeys} from './source/has-writable-keys.d.ts';
113
+ export type {Spread} from './source/spread.d.ts';
114
+ export type {IsInteger} from './source/is-integer.d.ts';
115
+ export type {IsFloat} from './source/is-float.d.ts';
116
+ export type {TupleToObject} from './source/tuple-to-object.d.ts';
117
+ export type {TupleToUnion} from './source/tuple-to-union.d.ts';
118
+ export type {UnionToTuple} from './source/union-to-tuple.d.ts';
119
+ export type {IntRange} from './source/int-range.d.ts';
120
+ export type {IntClosedRange} from './source/int-closed-range.d.ts';
121
+ export type {IsEqual} from './source/is-equal.d.ts';
116
122
  export type {
117
123
  IsLiteral,
118
124
  IsStringLiteral,
119
125
  IsNumericLiteral,
120
126
  IsBooleanLiteral,
121
127
  IsSymbolLiteral,
122
- } from './source/is-literal';
123
- export type {IsAny} from './source/is-any';
124
- export type {IfAny} from './source/if-any';
125
- export type {IsNever} from './source/is-never';
126
- export type {IfNever} from './source/if-never';
127
- export type {IsUnknown} from './source/is-unknown';
128
- export type {IfUnknown} from './source/if-unknown';
129
- export type {IsTuple} from './source/is-tuple';
130
- export type {ArrayIndices} from './source/array-indices';
131
- export type {ArrayValues} from './source/array-values';
132
- export type {ArraySlice} from './source/array-slice';
133
- export type {ArraySplice} from './source/array-splice';
134
- export type {ArrayTail} from './source/array-tail';
135
- export type {SetFieldType} from './source/set-field-type';
136
- export type {Paths} from './source/paths';
137
- export type {AllUnionFields} from './source/all-union-fields';
138
- export type {SharedUnionFields} from './source/shared-union-fields';
139
- export type {SharedUnionFieldsDeep} from './source/shared-union-fields-deep';
140
- export type {IsNull} from './source/is-null';
141
- export type {IfNull} from './source/if-null';
142
- export type {And} from './source/and';
143
- export type {Or} from './source/or';
144
- export type {NonEmptyTuple} from './source/non-empty-tuple';
145
- export type {FindGlobalInstanceType, FindGlobalType} from './source/find-global-type';
128
+ } from './source/is-literal.d.ts';
129
+ export type {IsAny} from './source/is-any.d.ts';
130
+ export type {IfAny} from './source/if-any.d.ts';
131
+ export type {IsNever} from './source/is-never.d.ts';
132
+ export type {IfNever} from './source/if-never.d.ts';
133
+ export type {IsUnknown} from './source/is-unknown.d.ts';
134
+ export type {IfUnknown} from './source/if-unknown.d.ts';
135
+ export type {IsTuple} from './source/is-tuple.d.ts';
136
+ export type {ArrayIndices} from './source/array-indices.d.ts';
137
+ export type {ArrayValues} from './source/array-values.d.ts';
138
+ export type {ArraySlice} from './source/array-slice.d.ts';
139
+ export type {ArraySplice} from './source/array-splice.d.ts';
140
+ export type {ArrayTail} from './source/array-tail.d.ts';
141
+ export type {SetFieldType} from './source/set-field-type.d.ts';
142
+ export type {Paths} from './source/paths.d.ts';
143
+ export type {AllUnionFields} from './source/all-union-fields.d.ts';
144
+ export type {SharedUnionFields} from './source/shared-union-fields.d.ts';
145
+ export type {SharedUnionFieldsDeep} from './source/shared-union-fields-deep.d.ts';
146
+ export type {IsNull} from './source/is-null.d.ts';
147
+ export type {IfNull} from './source/if-null.d.ts';
148
+ export type {IsUndefined} from './source/is-undefined.d.ts';
149
+ export type {And} from './source/and.d.ts';
150
+ export type {Or} from './source/or.d.ts';
151
+ export type {AllExtend} from './source/all-extend.d.ts';
152
+ export type {NonEmptyTuple} from './source/non-empty-tuple.d.ts';
153
+ export type {FindGlobalInstanceType, FindGlobalType} from './source/find-global-type.d.ts';
154
+ export type {If} from './source/if.d.ts';
155
+ export type {IsUnion} from './source/is-union.d.ts';
156
+ export type {IsLowercase} from './source/is-lowercase.d.ts';
157
+ export type {IsUppercase} from './source/is-uppercase.d.ts';
158
+ export type {IsOptional} from './source/is-optional.d.ts';
159
+ export type {IsNullable} from './source/is-nullable.d.ts';
146
160
 
147
161
  // Template literal types
148
- export type {CamelCase} from './source/camel-case';
149
- export type {CamelCasedProperties} from './source/camel-cased-properties';
150
- export type {CamelCasedPropertiesDeep} from './source/camel-cased-properties-deep';
151
- export type {KebabCase} from './source/kebab-case';
152
- export type {KebabCasedProperties} from './source/kebab-cased-properties';
153
- export type {KebabCasedPropertiesDeep} from './source/kebab-cased-properties-deep';
154
- export type {PascalCase} from './source/pascal-case';
155
- export type {PascalCasedProperties} from './source/pascal-cased-properties';
156
- export type {PascalCasedPropertiesDeep} from './source/pascal-cased-properties-deep';
157
- export type {SnakeCase} from './source/snake-case';
158
- export type {SnakeCasedProperties} from './source/snake-cased-properties';
159
- export type {SnakeCasedPropertiesDeep} from './source/snake-cased-properties-deep';
160
- export type {ScreamingSnakeCase} from './source/screaming-snake-case';
161
- export type {DelimiterCase} from './source/delimiter-case';
162
- export type {DelimiterCasedProperties} from './source/delimiter-cased-properties';
163
- export type {DelimiterCasedPropertiesDeep} from './source/delimiter-cased-properties-deep';
164
- export type {Join} from './source/join';
165
- export type {Split} from './source/split';
166
- export type {Words} from './source/words';
167
- export type {Trim} from './source/trim';
168
- export type {Replace} from './source/replace';
169
- export type {StringRepeat} from './source/string-repeat';
170
- export type {Includes} from './source/includes';
171
- export type {Get} from './source/get';
172
- export type {LastArrayElement} from './source/last-array-element';
162
+ export type {CamelCase} from './source/camel-case.d.ts';
163
+ export type {CamelCasedProperties} from './source/camel-cased-properties.d.ts';
164
+ export type {CamelCasedPropertiesDeep} from './source/camel-cased-properties-deep.d.ts';
165
+ export type {KebabCase} from './source/kebab-case.d.ts';
166
+ export type {KebabCasedProperties} from './source/kebab-cased-properties.d.ts';
167
+ export type {KebabCasedPropertiesDeep} from './source/kebab-cased-properties-deep.d.ts';
168
+ export type {PascalCase} from './source/pascal-case.d.ts';
169
+ export type {PascalCasedProperties} from './source/pascal-cased-properties.d.ts';
170
+ export type {PascalCasedPropertiesDeep} from './source/pascal-cased-properties-deep.d.ts';
171
+ export type {SnakeCase} from './source/snake-case.d.ts';
172
+ export type {SnakeCasedProperties} from './source/snake-cased-properties.d.ts';
173
+ export type {SnakeCasedPropertiesDeep} from './source/snake-cased-properties-deep.d.ts';
174
+ export type {ScreamingSnakeCase} from './source/screaming-snake-case.d.ts';
175
+ export type {DelimiterCase} from './source/delimiter-case.d.ts';
176
+ export type {DelimiterCasedProperties} from './source/delimiter-cased-properties.d.ts';
177
+ export type {DelimiterCasedPropertiesDeep} from './source/delimiter-cased-properties-deep.d.ts';
178
+ export type {Join} from './source/join.d.ts';
179
+ export type {Split} from './source/split.d.ts';
180
+ export type {Words} from './source/words.d.ts';
181
+ export type {Trim} from './source/trim.d.ts';
182
+ export type {Replace} from './source/replace.d.ts';
183
+ export type {StringRepeat} from './source/string-repeat.d.ts';
184
+ export type {Includes} from './source/includes.d.ts';
185
+ export type {Get} from './source/get.d.ts';
186
+ export type {LastArrayElement} from './source/last-array-element.d.ts';
187
+ export type {ConditionalSimplify} from './source/conditional-simplify.d.ts';
188
+ export type {ConditionalSimplifyDeep} from './source/conditional-simplify-deep.d.ts';
189
+ export type {RemovePrefix} from './source/remove-prefix.d.ts';
173
190
 
174
191
  // Miscellaneous
175
- export type {GlobalThis} from './source/global-this';
176
- export type {PackageJson} from './source/package-json';
177
- export type {TsConfigJson} from './source/tsconfig-json';
192
+ export type {GlobalThis} from './source/global-this.d.ts';
193
+ export type {PackageJson} from './source/package-json.d.ts';
194
+ export type {TsConfigJson} from './source/tsconfig-json.d.ts';
195
+
196
+ // Improved built-in
197
+ export type {ExtendsStrict} from './source/extends-strict.d.ts';
198
+ export type {ExtractStrict} from './source/extract-strict.d.ts';
199
+ export type {ExcludeStrict} from './source/exclude-strict.d.ts';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "type-fest",
3
- "version": "4.40.1",
3
+ "version": "5.0.0",
4
4
  "description": "A collection of essential TypeScript types",
5
5
  "license": "(MIT OR CC0-1.0)",
6
6
  "repository": "sindresorhus/type-fest",
@@ -10,13 +10,21 @@
10
10
  "email": "sindresorhus@gmail.com",
11
11
  "url": "https://sindresorhus.com"
12
12
  },
13
+ "type": "module",
14
+ "exports": {
15
+ ".": {
16
+ "types": "./index.d.ts"
17
+ },
18
+ "./globals": {
19
+ "types": "./source/globals/index.d.ts"
20
+ }
21
+ },
13
22
  "types": "./index.d.ts",
14
23
  "sideEffects": false,
15
24
  "engines": {
16
- "node": ">=16"
25
+ "node": ">=20"
17
26
  },
18
27
  "scripts": {
19
- "test:source-files-extension": "node script/test/source-files-extension.js",
20
28
  "test:tsc": "tsc",
21
29
  "test:tsd": "tsd",
22
30
  "test:xo": "xo",
@@ -40,48 +48,16 @@
40
48
  "json",
41
49
  "generics"
42
50
  ],
43
- "devDependencies": {
44
- "expect-type": "^1.1.0",
45
- "npm-run-all2": "^7.0.1",
46
- "tsd": "^0.32.0",
47
- "typescript": "~5.8.3",
48
- "xo": "^0.60.0"
51
+ "dependencies": {
52
+ "tagged-tag": "^1.0.0"
49
53
  },
50
- "xo": {
51
- "rules": {
52
- "@typescript-eslint/no-extraneous-class": "off",
53
- "@typescript-eslint/ban-ts-comment": "off",
54
- "@typescript-eslint/ban-types": "off",
55
- "@typescript-eslint/naming-convention": "off",
56
- "import/extensions": "off",
57
- "@typescript-eslint/no-redeclare": "off",
58
- "@typescript-eslint/no-confusing-void-expression": "off",
59
- "@typescript-eslint/no-unsafe-argument": "off",
60
- "n/file-extension-in-import": "off",
61
- "object-curly-newline": [
62
- "error",
63
- {
64
- "multiline": true,
65
- "consistent": true
66
- }
67
- ],
68
- "import/consistent-type-specifier-style": [
69
- "error",
70
- "prefer-top-level"
71
- ]
72
- },
73
- "overrides": [
74
- {
75
- "files": "**/*.d.ts",
76
- "rules": {
77
- "no-restricted-imports": [
78
- "error",
79
- "tsd",
80
- "expect-type"
81
- ]
82
- }
83
- }
84
- ]
54
+ "devDependencies": {
55
+ "@sindresorhus/tsconfig": "^8.0.1",
56
+ "expect-type": "^1.2.2",
57
+ "npm-run-all2": "^8.0.4",
58
+ "tsd": "^0.33.0",
59
+ "typescript": "^5.9.2",
60
+ "xo": "^1.2.2"
85
61
  },
86
62
  "tsd": {
87
63
  "compilerOptions": {