yummies 5.0.0 → 5.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yummies",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "keywords": [],
5
5
  "author": "js2me",
6
6
  "license": "MIT",
@@ -1,47 +1,175 @@
1
1
  /**
2
- * Extract all values from object or array
2
+ * Extracts all values from an object or array type.
3
+ *
4
+ * @template T - The input type to extract values from
5
+ * @returns The union of all possible values in T
3
6
  */
4
7
  type ValueOf<T> = T[keyof T];
5
- /** Converts enum keys to union */
8
+ /**
9
+ * Extracts enum keys as a union type.
10
+ *
11
+ * @template T - The enum type to extract keys from
12
+ * @returns A union of all string keys in the enum
13
+ */
6
14
  type ExtractEnumKeys<T> = ValueOf<{
7
15
  [key in keyof T]: key extends string ? key : never;
8
16
  }>;
9
- /** Converts enum values to union */
17
+ /**
18
+ * Extracts enum values as a union type.
19
+ *
20
+ * @template T - The enum type to extract values from
21
+ * @returns A union of all string and numeric values in the enum
22
+ */
10
23
  type ExtractEnumValues<T> = `${T & string}` | (T & number);
24
+ /**
25
+ * Represents a type that can be either the specified type or undefined.
26
+ *
27
+ * @template T - The type to make possibly undefined
28
+ * @returns T or undefined
29
+ */
11
30
  type Maybe<T> = Nullable<T> | undefined;
31
+ /**
32
+ * Represents a type that can be either the specified type or null.
33
+ *
34
+ * @template T - The type to make possibly null
35
+ * @returns T or null
36
+ */
12
37
  type Nullable<T> = T | null;
13
38
  /**
14
- * Any object with any values
39
+ * Represents any object with any keys and any values.
40
+ *
41
+ * @returns Record with any keys and any values
15
42
  */
16
43
  type AnyObject = Record<keyof any, any>;
17
44
  /**
18
- * Empty object without properties
45
+ * Represents an empty object with no properties.
46
+ *
47
+ * @returns Record with no keys and no values
19
48
  */
20
49
  type EmptyObject = Record<keyof any, never>;
50
+ /**
51
+ * Represents any primitive type (string, number, boolean, null, or undefined).
52
+ *
53
+ * @returns Union of all primitive types
54
+ */
21
55
  type AnyPrimitive = string | number | boolean | null | undefined;
56
+ /**
57
+ * Represents any function type.
58
+ *
59
+ * @returns Function with any parameters and return type
60
+ */
22
61
  type AnyFunction = (...args: any) => any;
62
+ /**
63
+ * Converts a union type to an intersection type.
64
+ *
65
+ * @template U - The union type to convert
66
+ * @returns Intersection of all types in the union
67
+ */
23
68
  type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
69
+ /**
70
+ * Represents falsy values (undefined, null, empty string, false, or 0).
71
+ *
72
+ * @returns Union of all falsy values
73
+ */
24
74
  type FalsyValues = undefined | null | '' | false | 0;
75
+ /**
76
+ * Represents a type that can be either the specified type, undefined, or a falsy value.
77
+ *
78
+ * @template T - The type to make possibly falsy
79
+ * @returns T, undefined, or a falsy value
80
+ */
25
81
  type MaybeFalsy<T> = Maybe<T> | FalsyValues;
82
+ /**
83
+ * Represents a type that can be either the specified type or a function returning that type.
84
+ *
85
+ * @template T - The type to make possibly a function
86
+ * @template TArgs - Arguments type for the function
87
+ * @returns T or a function that returns T
88
+ */
26
89
  type MaybeFn<T, TArgs extends any[] = any[]> = T | ((...args: TArgs) => T);
90
+ /**
91
+ * Represents a class constructor type.
92
+ *
93
+ * @template T - The type the class constructs
94
+ * @template Args - Constructor arguments type
95
+ * @returns Constructor function for T with specified arguments
96
+ */
27
97
  type Class<T, Args extends any[] = any[]> = new (...args: Args) => T;
28
98
  /**
29
- * Все свойства будут опциональны, в любую глубину
99
+ * Creates a deeply partial version of a type, making all properties optional recursively.
100
+ *
101
+ * @template T - The type to make deeply partial
102
+ * @returns A type with all properties optional at any depth
30
103
  */
31
104
  type DeepPartial<T> = T extends BrowserNativeObject ? T : {
32
105
  [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] : DeepPartial<T[K]>;
33
106
  };
107
+ /**
108
+ * Makes specified keys of a type optional while keeping the rest required.
109
+ *
110
+ * @template T - The original type
111
+ * @template K - The keys to make optional
112
+ * @returns A type with specified keys optional and others required
113
+ */
34
114
  type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
115
+ /**
116
+ * Makes specified keys of a type required while keeping the rest optional.
117
+ *
118
+ * @template T - The original type
119
+ * @template K - The keys to make required
120
+ * @returns A type with specified keys required and others optional
121
+ */
35
122
  type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
123
+ /**
124
+ * Extracts the inner type from a Promise type.
125
+ *
126
+ * @deprecated use `Awaited<T>` from stdlib of TypeScript
127
+ *
128
+ * @template T - The type that may be a Promise
129
+ * @returns The resolved type of the Promise or T itself if not a Promise
130
+ */
36
131
  type Unpromise<T> = T extends Promise<infer TValue> ? TValue : T;
132
+ /**
133
+ * Makes all values in an object type possibly undefined.
134
+ *
135
+ * @template T - The object type to make values possibly undefined
136
+ * @returns A type with all values possibly undefined
137
+ */
37
138
  type MaybeValues<T extends AnyObject> = {
38
139
  [K in keyof T]: Maybe<T[K]>;
39
140
  };
141
+ /**
142
+ * Gets the keys of an object whose values match a specific type.
143
+ *
144
+ * @template T - The object type
145
+ * @template TValues - The value type to match
146
+ * @returns Union of keys whose values match TValues
147
+ */
40
148
  type KeyOfByValue<T, TValues> = ValueOf<{
41
149
  [K in keyof T]: T[K] extends TValues ? K : never;
42
150
  }>;
151
+ /**
152
+ * Picks properties from an object whose values match a specific type.
153
+ *
154
+ * @template T - The object type
155
+ * @template TValues - The value type to match
156
+ * @returns A type with only the properties whose values match TValues
157
+ */
43
158
  type PickByValue<T, TValues> = Pick<T, KeyOfByValue<T, TValues>>;
159
+ /**
160
+ * Omits properties from an object whose values match a specific type.
161
+ *
162
+ * @template T - The object type
163
+ * @template TValues - The value type to match
164
+ * @returns A type with the properties whose values match TValues omitted
165
+ */
44
166
  type OmitByValue<T, TValues> = Omit<T, KeyOfByValue<T, TValues>>;
167
+ /**
168
+ * Determines if all properties in a type are optional.
169
+ *
170
+ * @template T - The type to check
171
+ * @returns True if all properties are optional, false otherwise
172
+ */
45
173
  type IsPartial<T> = keyof T extends never ? true : {
46
174
  [K in keyof T]-?: undefined extends T[K] ? never : K;
47
175
  } extends {
@@ -49,27 +177,98 @@ type IsPartial<T> = keyof T extends never ? true : {
49
177
  } ? true : T extends EmptyObject ? true : false;
50
178
  /**
51
179
  * @deprecated use `IsPartial<T>` . Better naming
180
+ *
181
+ * @template T - The type to check
182
+ * @returns True if all properties are optional, false otherwise
52
183
  */
53
184
  type AllPropertiesOptional<T> = IsPartial<T>;
185
+ /**
186
+ * Conditionally makes a type partially optional based on a condition.
187
+ *
188
+ * @template TCondition - The condition to check
189
+ * @template TObject - The object type to make partial if condition is true
190
+ * @returns Partial<TObject> if TCondition is true, otherwise TObject
191
+ */
54
192
  type PartialIf<TCondition, TObject> = TCondition extends true ? Partial<TObject> : TObject;
193
+ /**
194
+ * Converts a record type into an array of key-value pairs.
195
+ *
196
+ * @template T - The record type to convert
197
+ * @returns Array of [key, value] tuples
198
+ */
55
199
  type RecordEntries<T extends AnyObject> = T extends Record<infer Keys, infer Values> ? [Keys, Values][] : T extends Partial<Record<infer Keys, infer Values>> ? [Keys, Values][] : never;
200
+ /**
201
+ * Renames a key in an object type, preserving the optional nature of the property.
202
+ *
203
+ * @template TObject - The object type
204
+ * @template TOldKey - The old key name
205
+ * @template TNewKey - The new key name
206
+ * @returns A type with the key renamed
207
+ */
56
208
  type RenameKey<TObject, TOldKey extends keyof TObject, TNewKey extends string> = Omit<TObject, TOldKey> & IsPartial<Pick<TObject, TOldKey>> extends true ? {
57
209
  [K in TNewKey]?: TObject[TOldKey];
58
210
  } : {
59
211
  [K in TNewKey]: TObject[TOldKey];
60
212
  };
213
+ /**
214
+ * Determines if an object type is empty (has no properties).
215
+ *
216
+ * @template T - The object type to check
217
+ * @returns True if the object is empty, false otherwise
218
+ */
61
219
  type IsObjectEmpty<T extends AnyObject> = T extends EmptyObject ? true : keyof T extends never ? true : never;
220
+ /**
221
+ * Determines if an array type is empty.
222
+ *
223
+ * @template T - The array type to check
224
+ * @returns True if the array is empty, false otherwise
225
+ */
62
226
  type IsEmptyArray<T extends readonly any[]> = T extends [] ? true : false;
227
+ /**
228
+ * Extracts the parameter types from a function type.
229
+ *
230
+ * @template T - The function type to extract parameters from
231
+ * @returns Union of all possible parameter types
232
+ */
63
233
  type Params<T extends (...args: any) => any> = T extends {
64
234
  (...args: infer P1): any;
65
235
  (...args: infer P2): any;
66
236
  } ? P1 | P2 : T extends (...args: infer P) => any ? P : never;
237
+ /**
238
+ * Represents all primitive types in TypeScript.
239
+ *
240
+ * @returns Union of all primitive types
241
+ */
67
242
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
243
+ /**
244
+ * Represents browser native object types.
245
+ *
246
+ * @returns Union of browser native object types
247
+ */
68
248
  type BrowserNativeObject = Date | FileList | File | Element | Node;
249
+ /**
250
+ * Removes undefined from a type.
251
+ *
252
+ * @template T - The type to remove undefined from
253
+ * @returns T with undefined removed
254
+ */
69
255
  type NonUndefined<T> = T extends undefined ? never : T;
256
+ /**
257
+ * Creates a literal union type that includes both a specific literal type and a primitive type.
258
+ *
259
+ * @template T - The literal type
260
+ * @template U - The primitive type
261
+ * @returns Union of T and U with a private property to prevent widening
262
+ */
70
263
  type LiteralUnion<T extends U, U extends Primitive> = T | (U & {
71
264
  _?: never;
72
265
  });
266
+ /**
267
+ * Extracts object types from a type, excluding primitives.
268
+ *
269
+ * @template T - The type to extract objects from
270
+ * @returns T if it's an object, otherwise never
271
+ */
73
272
  type ExtractObjects<T> = T extends infer U ? U extends object ? U : never : never;
74
273
  /**
75
274
  * Replace value in object by key
@@ -80,11 +279,29 @@ type ExtractObjects<T> = T extends infer U ? U extends object ? U : never : neve
80
279
  * type FixedTest = OverrideKey<Test, 'bar', string>
81
280
  * // { foo: string; bar?: string }
82
281
  * ```
282
+ *
283
+ * @template T - The object type
284
+ * @template K - The key to replace
285
+ * @template V - The new value type
286
+ * @returns A type with the specified key replaced with the new value type
83
287
  */
84
288
  type OverrideKey<T, K extends keyof T, V> = {
85
289
  [KK in keyof T]: KK extends K ? V : T[KK];
86
290
  };
291
+ /**
292
+ * Checks if two types are equal.
293
+ *
294
+ * @template X - First type to compare
295
+ * @template Y - Second type to compare
296
+ * @returns True if types are equal, false otherwise
297
+ */
87
298
  type IfEquals<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
299
+ /**
300
+ * Gets the writable keys of a type (keys that are not readonly).
301
+ *
302
+ * @template T - The type to extract writable keys from
303
+ * @returns Union of keys that are not readonly
304
+ */
88
305
  type WritableKeys<T> = {
89
306
  [K in keyof T]: IfEquals<{
90
307
  [Q in K]: T[K];
@@ -92,17 +309,72 @@ type WritableKeys<T> = {
92
309
  -readonly [Q in K]: T[K];
93
310
  }> extends true ? K : never;
94
311
  }[keyof T];
312
+ /**
313
+ * Gets the non-readonly properties of a type.
314
+ *
315
+ * @template T - The type to extract non-readonly properties from
316
+ * @returns A type with only the non-readonly properties
317
+ */
95
318
  type NonReadonly<T> = Pick<T, WritableKeys<T>>;
319
+ /**
320
+ * Determines if a type is an array.
321
+ *
322
+ * @template T - The type to check
323
+ * @returns True if the type is an array, false otherwise
324
+ */
96
325
  type IsArray<T> = T extends object ? T extends Function ? false : T extends any[] ? true : false : false;
326
+ /**
327
+ * Determines if a type is a function.
328
+ *
329
+ * @template T - The type to check
330
+ * @returns True if the type is a function, false otherwise
331
+ */
97
332
  type IsFunction<T> = T extends object ? T extends Function ? true : false : false;
333
+ /**
334
+ * Determines if a type is an object (but not an array or function).
335
+ *
336
+ * @template T - The type to check
337
+ * @returns True if the type is an object, false otherwise
338
+ */
98
339
  type IsObject<T> = T extends object ? T extends Function ? false : T extends any[] ? false : true : false;
340
+ /**
341
+ * Creates a deep copy of an object type, preserving the structure.
342
+ *
343
+ * @template T - The type to copy
344
+ * @returns A deep copy of the type
345
+ */
99
346
  type CopyObject<T> = IsObject<T> extends true ? {
100
347
  [K in keyof T]: IsObject<T[K]> extends true ? CopyObject<T[K]> : T[K];
101
348
  } : T;
349
+ /**
350
+ * Represents a type that can be either the specified type or a Promise resolving to that type.
351
+ *
352
+ * @template T - The type to make possibly a promise
353
+ * @returns T or Promise<T>
354
+ */
102
355
  type MaybePromise<T> = T | Promise<T>;
356
+ /**
357
+ * Makes specified keys of a type required while keeping the rest optional.
358
+ *
359
+ * @template TTarget - The original type
360
+ * @template TKey - The key(s) to make required
361
+ * @returns A type with specified keys required and others optional
362
+ */
103
363
  type WithRequired<TTarget, TKey extends keyof TTarget> = TTarget & {
104
364
  [_ in TKey]: {};
105
365
  };
366
+ /**
367
+ * Extracts the index keys from an array type.
368
+ *
369
+ * @template T - The array type to extract index keys from
370
+ * @returns Union of index keys (string representations of numbers)
371
+ */
106
372
  type IndexKeys<T extends any[]> = Extract<keyof T, `${number}`>;
373
+ /**
374
+ * Removes undefined from a type.
375
+ *
376
+ * @template T - The type to remove undefined from
377
+ * @returns T with undefined removed
378
+ */
107
379
  type Defined<T> = Exclude<T, undefined>;
108
380
  //# sourceMappingURL=types.d.ts.map
package/utils/types.d.ts CHANGED
@@ -1,47 +1,175 @@
1
1
  /**
2
- * Extract all values from object or array
2
+ * Extracts all values from an object or array type.
3
+ *
4
+ * @template T - The input type to extract values from
5
+ * @returns The union of all possible values in T
3
6
  */
4
7
  export type ValueOf<T> = T[keyof T];
5
- /** Converts enum keys to union */
8
+ /**
9
+ * Extracts enum keys as a union type.
10
+ *
11
+ * @template T - The enum type to extract keys from
12
+ * @returns A union of all string keys in the enum
13
+ */
6
14
  export type ExtractEnumKeys<T> = ValueOf<{
7
15
  [key in keyof T]: key extends string ? key : never;
8
16
  }>;
9
- /** Converts enum values to union */
17
+ /**
18
+ * Extracts enum values as a union type.
19
+ *
20
+ * @template T - The enum type to extract values from
21
+ * @returns A union of all string and numeric values in the enum
22
+ */
10
23
  export type ExtractEnumValues<T> = `${T & string}` | (T & number);
24
+ /**
25
+ * Represents a type that can be either the specified type or undefined.
26
+ *
27
+ * @template T - The type to make possibly undefined
28
+ * @returns T or undefined
29
+ */
11
30
  export type Maybe<T> = Nullable<T> | undefined;
31
+ /**
32
+ * Represents a type that can be either the specified type or null.
33
+ *
34
+ * @template T - The type to make possibly null
35
+ * @returns T or null
36
+ */
12
37
  export type Nullable<T> = T | null;
13
38
  /**
14
- * Any object with any values
39
+ * Represents any object with any keys and any values.
40
+ *
41
+ * @returns Record with any keys and any values
15
42
  */
16
43
  export type AnyObject = Record<keyof any, any>;
17
44
  /**
18
- * Empty object without properties
45
+ * Represents an empty object with no properties.
46
+ *
47
+ * @returns Record with no keys and no values
19
48
  */
20
49
  export type EmptyObject = Record<keyof any, never>;
50
+ /**
51
+ * Represents any primitive type (string, number, boolean, null, or undefined).
52
+ *
53
+ * @returns Union of all primitive types
54
+ */
21
55
  export type AnyPrimitive = string | number | boolean | null | undefined;
56
+ /**
57
+ * Represents any function type.
58
+ *
59
+ * @returns Function with any parameters and return type
60
+ */
22
61
  export type AnyFunction = (...args: any) => any;
62
+ /**
63
+ * Converts a union type to an intersection type.
64
+ *
65
+ * @template U - The union type to convert
66
+ * @returns Intersection of all types in the union
67
+ */
23
68
  export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
69
+ /**
70
+ * Represents falsy values (undefined, null, empty string, false, or 0).
71
+ *
72
+ * @returns Union of all falsy values
73
+ */
24
74
  export type FalsyValues = undefined | null | '' | false | 0;
75
+ /**
76
+ * Represents a type that can be either the specified type, undefined, or a falsy value.
77
+ *
78
+ * @template T - The type to make possibly falsy
79
+ * @returns T, undefined, or a falsy value
80
+ */
25
81
  export type MaybeFalsy<T> = Maybe<T> | FalsyValues;
82
+ /**
83
+ * Represents a type that can be either the specified type or a function returning that type.
84
+ *
85
+ * @template T - The type to make possibly a function
86
+ * @template TArgs - Arguments type for the function
87
+ * @returns T or a function that returns T
88
+ */
26
89
  export type MaybeFn<T, TArgs extends any[] = any[]> = T | ((...args: TArgs) => T);
90
+ /**
91
+ * Represents a class constructor type.
92
+ *
93
+ * @template T - The type the class constructs
94
+ * @template Args - Constructor arguments type
95
+ * @returns Constructor function for T with specified arguments
96
+ */
27
97
  export type Class<T, Args extends any[] = any[]> = new (...args: Args) => T;
28
98
  /**
29
- * Все свойства будут опциональны, в любую глубину
99
+ * Creates a deeply partial version of a type, making all properties optional recursively.
100
+ *
101
+ * @template T - The type to make deeply partial
102
+ * @returns A type with all properties optional at any depth
30
103
  */
31
104
  export type DeepPartial<T> = T extends BrowserNativeObject ? T : {
32
105
  [K in keyof T]?: ExtractObjects<T[K]> extends never ? T[K] : DeepPartial<T[K]>;
33
106
  };
107
+ /**
108
+ * Makes specified keys of a type optional while keeping the rest required.
109
+ *
110
+ * @template T - The original type
111
+ * @template K - The keys to make optional
112
+ * @returns A type with specified keys optional and others required
113
+ */
34
114
  export type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
115
+ /**
116
+ * Makes specified keys of a type required while keeping the rest optional.
117
+ *
118
+ * @template T - The original type
119
+ * @template K - The keys to make required
120
+ * @returns A type with specified keys required and others optional
121
+ */
35
122
  export type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
123
+ /**
124
+ * Extracts the inner type from a Promise type.
125
+ *
126
+ * @deprecated use `Awaited<T>` from stdlib of TypeScript
127
+ *
128
+ * @template T - The type that may be a Promise
129
+ * @returns The resolved type of the Promise or T itself if not a Promise
130
+ */
36
131
  export type Unpromise<T> = T extends Promise<infer TValue> ? TValue : T;
132
+ /**
133
+ * Makes all values in an object type possibly undefined.
134
+ *
135
+ * @template T - The object type to make values possibly undefined
136
+ * @returns A type with all values possibly undefined
137
+ */
37
138
  export type MaybeValues<T extends AnyObject> = {
38
139
  [K in keyof T]: Maybe<T[K]>;
39
140
  };
141
+ /**
142
+ * Gets the keys of an object whose values match a specific type.
143
+ *
144
+ * @template T - The object type
145
+ * @template TValues - The value type to match
146
+ * @returns Union of keys whose values match TValues
147
+ */
40
148
  export type KeyOfByValue<T, TValues> = ValueOf<{
41
149
  [K in keyof T]: T[K] extends TValues ? K : never;
42
150
  }>;
151
+ /**
152
+ * Picks properties from an object whose values match a specific type.
153
+ *
154
+ * @template T - The object type
155
+ * @template TValues - The value type to match
156
+ * @returns A type with only the properties whose values match TValues
157
+ */
43
158
  export type PickByValue<T, TValues> = Pick<T, KeyOfByValue<T, TValues>>;
159
+ /**
160
+ * Omits properties from an object whose values match a specific type.
161
+ *
162
+ * @template T - The object type
163
+ * @template TValues - The value type to match
164
+ * @returns A type with the properties whose values match TValues omitted
165
+ */
44
166
  export type OmitByValue<T, TValues> = Omit<T, KeyOfByValue<T, TValues>>;
167
+ /**
168
+ * Determines if all properties in a type are optional.
169
+ *
170
+ * @template T - The type to check
171
+ * @returns True if all properties are optional, false otherwise
172
+ */
45
173
  export type IsPartial<T> = keyof T extends never ? true : {
46
174
  [K in keyof T]-?: undefined extends T[K] ? never : K;
47
175
  } extends {
@@ -49,27 +177,98 @@ export type IsPartial<T> = keyof T extends never ? true : {
49
177
  } ? true : T extends EmptyObject ? true : false;
50
178
  /**
51
179
  * @deprecated use `IsPartial<T>` . Better naming
180
+ *
181
+ * @template T - The type to check
182
+ * @returns True if all properties are optional, false otherwise
52
183
  */
53
184
  export type AllPropertiesOptional<T> = IsPartial<T>;
185
+ /**
186
+ * Conditionally makes a type partially optional based on a condition.
187
+ *
188
+ * @template TCondition - The condition to check
189
+ * @template TObject - The object type to make partial if condition is true
190
+ * @returns Partial<TObject> if TCondition is true, otherwise TObject
191
+ */
54
192
  export type PartialIf<TCondition, TObject> = TCondition extends true ? Partial<TObject> : TObject;
193
+ /**
194
+ * Converts a record type into an array of key-value pairs.
195
+ *
196
+ * @template T - The record type to convert
197
+ * @returns Array of [key, value] tuples
198
+ */
55
199
  export type RecordEntries<T extends AnyObject> = T extends Record<infer Keys, infer Values> ? [Keys, Values][] : T extends Partial<Record<infer Keys, infer Values>> ? [Keys, Values][] : never;
200
+ /**
201
+ * Renames a key in an object type, preserving the optional nature of the property.
202
+ *
203
+ * @template TObject - The object type
204
+ * @template TOldKey - The old key name
205
+ * @template TNewKey - The new key name
206
+ * @returns A type with the key renamed
207
+ */
56
208
  export type RenameKey<TObject, TOldKey extends keyof TObject, TNewKey extends string> = Omit<TObject, TOldKey> & IsPartial<Pick<TObject, TOldKey>> extends true ? {
57
209
  [K in TNewKey]?: TObject[TOldKey];
58
210
  } : {
59
211
  [K in TNewKey]: TObject[TOldKey];
60
212
  };
213
+ /**
214
+ * Determines if an object type is empty (has no properties).
215
+ *
216
+ * @template T - The object type to check
217
+ * @returns True if the object is empty, false otherwise
218
+ */
61
219
  export type IsObjectEmpty<T extends AnyObject> = T extends EmptyObject ? true : keyof T extends never ? true : never;
220
+ /**
221
+ * Determines if an array type is empty.
222
+ *
223
+ * @template T - The array type to check
224
+ * @returns True if the array is empty, false otherwise
225
+ */
62
226
  export type IsEmptyArray<T extends readonly any[]> = T extends [] ? true : false;
227
+ /**
228
+ * Extracts the parameter types from a function type.
229
+ *
230
+ * @template T - The function type to extract parameters from
231
+ * @returns Union of all possible parameter types
232
+ */
63
233
  export type Params<T extends (...args: any) => any> = T extends {
64
234
  (...args: infer P1): any;
65
235
  (...args: infer P2): any;
66
236
  } ? P1 | P2 : T extends (...args: infer P) => any ? P : never;
237
+ /**
238
+ * Represents all primitive types in TypeScript.
239
+ *
240
+ * @returns Union of all primitive types
241
+ */
67
242
  export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
243
+ /**
244
+ * Represents browser native object types.
245
+ *
246
+ * @returns Union of browser native object types
247
+ */
68
248
  export type BrowserNativeObject = Date | FileList | File | Element | Node;
249
+ /**
250
+ * Removes undefined from a type.
251
+ *
252
+ * @template T - The type to remove undefined from
253
+ * @returns T with undefined removed
254
+ */
69
255
  export type NonUndefined<T> = T extends undefined ? never : T;
256
+ /**
257
+ * Creates a literal union type that includes both a specific literal type and a primitive type.
258
+ *
259
+ * @template T - The literal type
260
+ * @template U - The primitive type
261
+ * @returns Union of T and U with a private property to prevent widening
262
+ */
70
263
  export type LiteralUnion<T extends U, U extends Primitive> = T | (U & {
71
264
  _?: never;
72
265
  });
266
+ /**
267
+ * Extracts object types from a type, excluding primitives.
268
+ *
269
+ * @template T - The type to extract objects from
270
+ * @returns T if it's an object, otherwise never
271
+ */
73
272
  export type ExtractObjects<T> = T extends infer U ? U extends object ? U : never : never;
74
273
  /**
75
274
  * Replace value in object by key
@@ -80,11 +279,29 @@ export type ExtractObjects<T> = T extends infer U ? U extends object ? U : never
80
279
  * type FixedTest = OverrideKey<Test, 'bar', string>
81
280
  * // { foo: string; bar?: string }
82
281
  * ```
282
+ *
283
+ * @template T - The object type
284
+ * @template K - The key to replace
285
+ * @template V - The new value type
286
+ * @returns A type with the specified key replaced with the new value type
83
287
  */
84
288
  export type OverrideKey<T, K extends keyof T, V> = {
85
289
  [KK in keyof T]: KK extends K ? V : T[KK];
86
290
  };
291
+ /**
292
+ * Checks if two types are equal.
293
+ *
294
+ * @template X - First type to compare
295
+ * @template Y - Second type to compare
296
+ * @returns True if types are equal, false otherwise
297
+ */
87
298
  export type IfEquals<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
299
+ /**
300
+ * Gets the writable keys of a type (keys that are not readonly).
301
+ *
302
+ * @template T - The type to extract writable keys from
303
+ * @returns Union of keys that are not readonly
304
+ */
88
305
  export type WritableKeys<T> = {
89
306
  [K in keyof T]: IfEquals<{
90
307
  [Q in K]: T[K];
@@ -92,17 +309,72 @@ export type WritableKeys<T> = {
92
309
  -readonly [Q in K]: T[K];
93
310
  }> extends true ? K : never;
94
311
  }[keyof T];
312
+ /**
313
+ * Gets the non-readonly properties of a type.
314
+ *
315
+ * @template T - The type to extract non-readonly properties from
316
+ * @returns A type with only the non-readonly properties
317
+ */
95
318
  export type NonReadonly<T> = Pick<T, WritableKeys<T>>;
319
+ /**
320
+ * Determines if a type is an array.
321
+ *
322
+ * @template T - The type to check
323
+ * @returns True if the type is an array, false otherwise
324
+ */
96
325
  export type IsArray<T> = T extends object ? T extends Function ? false : T extends any[] ? true : false : false;
326
+ /**
327
+ * Determines if a type is a function.
328
+ *
329
+ * @template T - The type to check
330
+ * @returns True if the type is a function, false otherwise
331
+ */
97
332
  export type IsFunction<T> = T extends object ? T extends Function ? true : false : false;
333
+ /**
334
+ * Determines if a type is an object (but not an array or function).
335
+ *
336
+ * @template T - The type to check
337
+ * @returns True if the type is an object, false otherwise
338
+ */
98
339
  export type IsObject<T> = T extends object ? T extends Function ? false : T extends any[] ? false : true : false;
340
+ /**
341
+ * Creates a deep copy of an object type, preserving the structure.
342
+ *
343
+ * @template T - The type to copy
344
+ * @returns A deep copy of the type
345
+ */
99
346
  export type CopyObject<T> = IsObject<T> extends true ? {
100
347
  [K in keyof T]: IsObject<T[K]> extends true ? CopyObject<T[K]> : T[K];
101
348
  } : T;
349
+ /**
350
+ * Represents a type that can be either the specified type or a Promise resolving to that type.
351
+ *
352
+ * @template T - The type to make possibly a promise
353
+ * @returns T or Promise<T>
354
+ */
102
355
  export type MaybePromise<T> = T | Promise<T>;
356
+ /**
357
+ * Makes specified keys of a type required while keeping the rest optional.
358
+ *
359
+ * @template TTarget - The original type
360
+ * @template TKey - The key(s) to make required
361
+ * @returns A type with specified keys required and others optional
362
+ */
103
363
  export type WithRequired<TTarget, TKey extends keyof TTarget> = TTarget & {
104
364
  [_ in TKey]: {};
105
365
  };
366
+ /**
367
+ * Extracts the index keys from an array type.
368
+ *
369
+ * @template T - The array type to extract index keys from
370
+ * @returns Union of index keys (string representations of numbers)
371
+ */
106
372
  export type IndexKeys<T extends any[]> = Extract<keyof T, `${number}`>;
373
+ /**
374
+ * Removes undefined from a type.
375
+ *
376
+ * @template T - The type to remove undefined from
377
+ * @returns T with undefined removed
378
+ */
107
379
  export type Defined<T> = Exclude<T, undefined>;
108
380
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":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