@augment-vir/common
Advanced tools
Comparing version 21.3.4 to 21.3.5
import { AnyFunction } from '../function'; | ||
import { ArrayElement } from '../type'; | ||
import { NestedKeys } from './nested-keys'; | ||
type InnerPickDeep<OriginalObjectGeneric, DeepKeys extends any[]> = DeepKeys extends [ | ||
export type InnerPickDeep<OriginalObjectGeneric, DeepKeys extends any[]> = DeepKeys extends [ | ||
infer CurrentLevelPick, | ||
...infer RemainingKeys | ||
] ? { | ||
[CurrentProp in Extract<CurrentLevelPick, keyof OriginalObjectGeneric>]: AnyFunction extends Extract<OriginalObjectGeneric[CurrentProp], AnyFunction> ? OriginalObjectGeneric[CurrentProp] | Exclude<OriginalObjectGeneric[CurrentProp], AnyFunction> : Array<any> extends Extract<OriginalObjectGeneric[CurrentProp], Array<any>> ? Array<InnerPickDeep<ArrayElement<Extract<OriginalObjectGeneric[CurrentProp], Array<any>>>, RemainingKeys>> | Exclude<OriginalObjectGeneric[CurrentProp], Array<any>> : ReadonlyArray<any> extends Extract<OriginalObjectGeneric[CurrentProp], ReadonlyArray<any>> ? ReadonlyArray<InnerPickDeep<ArrayElement<Extract<OriginalObjectGeneric[CurrentProp], ReadonlyArray<any>>>, RemainingKeys>> | Exclude<OriginalObjectGeneric[CurrentProp], ReadonlyArray<any>> : Extract<OriginalObjectGeneric[CurrentProp], Record<any, any>> extends never ? OriginalObjectGeneric[CurrentProp] : InnerPickDeep<Extract<OriginalObjectGeneric[CurrentProp], Record<any, any>>, RemainingKeys>; | ||
] ? Extract<CurrentLevelPick, keyof OriginalObjectGeneric> extends never ? OriginalObjectGeneric : { | ||
[CurrentProp in Extract<CurrentLevelPick, keyof OriginalObjectGeneric>]: AnyFunction extends Extract<OriginalObjectGeneric[CurrentProp], AnyFunction> ? OriginalObjectGeneric[CurrentProp] | Exclude<OriginalObjectGeneric[CurrentProp], AnyFunction> : Array<any> extends Extract<OriginalObjectGeneric[CurrentProp], Array<any>> ? Array<InnerPickDeep<ArrayElement<Extract<OriginalObjectGeneric[CurrentProp], Array<any>>>, RemainingKeys>> | Exclude<OriginalObjectGeneric[CurrentProp], Array<any>> : ReadonlyArray<any> extends Extract<OriginalObjectGeneric[CurrentProp], ReadonlyArray<any>> ? ReadonlyArray<InnerPickDeep<ArrayElement<Extract<OriginalObjectGeneric[CurrentProp], ReadonlyArray<any>>>, RemainingKeys>> | Exclude<OriginalObjectGeneric[CurrentProp], ReadonlyArray<any>> : Extract<OriginalObjectGeneric[CurrentProp], Record<any, any>> extends never ? OriginalObjectGeneric[CurrentProp] : InnerPickDeep<Extract<OriginalObjectGeneric[CurrentProp], Record<any, any>>, RemainingKeys> | Exclude<OriginalObjectGeneric[CurrentProp], Record<any, any>>; | ||
} : DeepKeys extends [] ? OriginalObjectGeneric : DeepKeys extends [infer CurrentLevelPick] ? CurrentLevelPick extends keyof OriginalObjectGeneric ? Pick<OriginalObjectGeneric, CurrentLevelPick> : never : never; | ||
@@ -17,2 +17,1 @@ /** | ||
export type PickDeep<OriginalObjectGeneric extends object, DeepKeys extends PropertyKey[]> = InnerPickDeep<OriginalObjectGeneric, DeepKeys>; | ||
export {}; |
{ | ||
"name": "@augment-vir/common", | ||
"version": "21.3.4", | ||
"version": "21.3.5", | ||
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common", | ||
@@ -5,0 +5,0 @@ "bugs": { |
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
172393
4162