yummies 7.20.0 → 7.20.1

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.20.0",
3
+ "version": "7.20.1",
4
4
  "keywords": [
5
5
  "javascript",
6
6
  "typescript",
@@ -15,7 +15,7 @@
15
15
  "homepage": "https://js2me.github.io/yummies/api/async/",
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "git+https://github.com/js2me/yummies.git"
18
+ "url": "https://github.com/js2me/yummies"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "mobx": "^6.12.4",
package/types.d.ts CHANGED
@@ -199,6 +199,16 @@ type MaybeKeys<T, TMaybeKeys extends keyof T> = {
199
199
  * @returns A type with specified keys required and others optional
200
200
  */
201
201
  type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
202
+ /**
203
+ * Applies {@link Defined} to the value types of specified keys while keeping the rest unchanged.
204
+ *
205
+ * @template T - The original type
206
+ * @template K - The keys whose value types should exclude `undefined`
207
+ * @returns A type with specified keys excluding `undefined` from their values and others unchanged
208
+ */
209
+ type DefinedKeys<T, K extends keyof T> = Omit<T, K> & {
210
+ [Key in K]: Defined<T[K]>;
211
+ };
202
212
  /**
203
213
  * Extracts the inner type from a Promise type.
204
214
  *
@@ -505,4 +515,4 @@ type RequiredPropertyIfNeeded<TPropertyName extends string, TPropertyValue> = TP
505
515
  [P in TPropertyName]: TPropertyValue;
506
516
  };
507
517
 
508
- 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, RequiredPropertyIfNeeded, UnionToIntersection, Unpromise, UpperFirst, ValueOf, WithRequired, WritableKeys };
518
+ export type { AllPropertiesOptional, AnyBoolean, AnyFunction, AnyNumber, AnyObject, AnyPrimitive, AnyString, BrowserNativeObject, Class, CopyObject, DeepPartial, Defined, DefinedKeys, 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, RequiredPropertyIfNeeded, UnionToIntersection, Unpromise, UpperFirst, ValueOf, WithRequired, WritableKeys };
package/types.global.d.ts CHANGED
@@ -200,6 +200,16 @@ type MaybeKeys<T, TMaybeKeys extends keyof T> = {
200
200
  * @returns A type with specified keys required and others optional
201
201
  */
202
202
  type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
203
+ /**
204
+ * Applies {@link Defined} to the value types of specified keys while keeping the rest unchanged.
205
+ *
206
+ * @template T - The original type
207
+ * @template K - The keys whose value types should exclude `undefined`
208
+ * @returns A type with specified keys excluding `undefined` from their values and others unchanged
209
+ */
210
+ type DefinedKeys<T, K extends keyof T> = Omit<T, K> & {
211
+ [Key in K]: Defined<T[K]>;
212
+ };
203
213
  /**
204
214
  * Extracts the inner type from a Promise type.
205
215
  *