type-fest
Advanced tools
Comparing version 4.28.0 to 4.28.1
{ | ||
"name": "type-fest", | ||
"version": "4.28.0", | ||
"version": "4.28.1", | ||
"description": "A collection of essential TypeScript types", | ||
@@ -5,0 +5,0 @@ "license": "(MIT OR CC0-1.0)", |
@@ -101,2 +101,3 @@ import type {NonRecursiveType, UnionMin, UnionMax, TupleLength, StaticPartOfArray, VariablePartOfArray, IsUnion, IsArrayReadonly, SetArrayAccess} from './internal'; | ||
type SharedObjectUnionFieldsDeep<Union, Options extends SharedUnionFieldsDeepOptions> = | ||
// `keyof Union` can extract the same key in union type, if there is no same key, return never. | ||
keyof Union extends infer Keys | ||
@@ -108,3 +109,7 @@ ? IsNever<Keys> extends false | ||
? Union[Key] | ||
: SharedUnionFieldsDeep<Union[Key], Options> | ||
// Remove `undefined` from the union to support optional | ||
// fields, then recover `undefined` if union was already undefined. | ||
: SharedUnionFieldsDeep<Exclude<Union[Key], undefined>, Options> | ( | ||
undefined extends Required<Union>[Key] ? undefined : never | ||
) | ||
} | ||
@@ -111,0 +116,0 @@ : {} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
394794
9398