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