yummies 7.5.0 → 7.6.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": "7.5.0",
3
+ "version": "7.6.0",
4
4
  "keywords": [
5
5
  "javascript",
6
6
  "typescript",
package/types.d.ts CHANGED
@@ -139,6 +139,16 @@ type DeepPartial<T> = T extends BrowserNativeObject ? T : {
139
139
  * @returns A type with specified keys optional and others required
140
140
  */
141
141
  type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
142
+ /**
143
+ * Makes specified keys of a type possibly Maybe<T> while keeping the rest required.
144
+ *
145
+ * @template T - The original type
146
+ * @template TMaybeKeys - The keys to make possibly Maybe<T>
147
+ * @returns A type with specified keys possibly Maybe<T> and others required
148
+ */
149
+ type MaybeKeys<T, TMaybeKeys extends keyof T> = {
150
+ [K in keyof T]: K extends TMaybeKeys ? Maybe<T[K]> : T[K];
151
+ };
142
152
  /**
143
153
  * Makes specified keys of a type required while keeping the rest optional.
144
154
  *
@@ -444,4 +454,4 @@ type AnyBoolean = boolean & {};
444
454
  */
445
455
  type UpperFirst<S extends string> = S extends `${infer F}${infer R}` ? `${Uppercase<F>}${R}` : S;
446
456
 
447
- export type { AllPropertiesOptional, AnyBoolean, AnyFunction, AnyNumber, AnyObject, AnyPrimitive, AnyString, BrowserNativeObject, Class, CopyObject, DeepPartial, Defined, Dict, EmptyObject, ExtractEnumKeys, ExtractEnumValues, ExtractObjects, FalsyValues, Fn, HasKey, HasSpecificKey, IfEquals, IndexKeys, IsAny, IsArray, IsEmptyArray, IsFunction, IsObject, IsObjectEmpty, IsPartial, IsUnknown, KeyOfByValue, LiteralUnion, Maybe, MaybeArray, MaybeFalsy, MaybeFn, MaybePromise, MaybeValues, NonReadonly, NonUndefined, NotMaybe, NotNullable, Nullable, OmitByValue, OverrideKey, Params, PartialIf, PartialKeys, PickByValue, Primitive, ReadonlyKeys, RecordEntries, RenameKey, RequiredKeys, UnionToIntersection, Unpromise, UpperFirst, ValueOf, WithRequired, WritableKeys };
457
+ export type { AllPropertiesOptional, AnyBoolean, AnyFunction, AnyNumber, AnyObject, AnyPrimitive, AnyString, BrowserNativeObject, Class, CopyObject, DeepPartial, Defined, Dict, EmptyObject, ExtractEnumKeys, ExtractEnumValues, ExtractObjects, FalsyValues, Fn, HasKey, HasSpecificKey, IfEquals, IndexKeys, IsAny, IsArray, IsEmptyArray, IsFunction, IsObject, IsObjectEmpty, IsPartial, IsUnknown, KeyOfByValue, LiteralUnion, Maybe, MaybeArray, MaybeFalsy, MaybeFn, MaybeKeys, MaybePromise, MaybeValues, NonReadonly, NonUndefined, NotMaybe, NotNullable, Nullable, OmitByValue, OverrideKey, Params, PartialIf, PartialKeys, PickByValue, Primitive, ReadonlyKeys, RecordEntries, RenameKey, RequiredKeys, UnionToIntersection, Unpromise, UpperFirst, ValueOf, WithRequired, WritableKeys };
package/types.global.d.ts CHANGED
@@ -140,6 +140,16 @@ type DeepPartial<T> = T extends BrowserNativeObject ? T : {
140
140
  * @returns A type with specified keys optional and others required
141
141
  */
142
142
  type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
143
+ /**
144
+ * Makes specified keys of a type possibly Maybe<T> while keeping the rest required.
145
+ *
146
+ * @template T - The original type
147
+ * @template TMaybeKeys - The keys to make possibly Maybe<T>
148
+ * @returns A type with specified keys possibly Maybe<T> and others required
149
+ */
150
+ type MaybeKeys<T, TMaybeKeys extends keyof T> = {
151
+ [K in keyof T]: K extends TMaybeKeys ? Maybe<T[K]> : T[K];
152
+ };
143
153
  /**
144
154
  * Makes specified keys of a type required while keeping the rest optional.
145
155
  *