Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@augment-vir/common

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/common - npm Package Compare versions

Comparing version 19.6.0 to 19.7.0

18

dist/types/augments/object/pick-deep.d.ts

@@ -0,6 +1,16 @@

import { AnyFunction } from '../function';
import { ArrayElement } from '../type';
import { NestedKeys } from './nested-keys';
type InnerPickDeep<OriginalObjectGeneric extends object, DeepKeys extends any[]> = DeepKeys extends [infer CurrentLevelPick, ...infer RemainingKeys] ? {
[CurrentProp in Extract<CurrentLevelPick, keyof OriginalObjectGeneric>]: OriginalObjectGeneric[CurrentProp] extends object ? InnerPickDeep<OriginalObjectGeneric[CurrentProp], RemainingKeys> : OriginalObjectGeneric[CurrentProp];
export type InnerPickDeep<OriginalObjectGeneric, DeepKeys extends any[]> = DeepKeys extends [
infer CurrentLevelPick,
...infer 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;
export type PickDeep<OriginalObjectGeneric extends object, DeepKeys extends NestedKeys<OriginalObjectGeneric>> = InnerPickDeep<OriginalObjectGeneric, DeepKeys>;
export {};
/**
* Pick nested keys with more strict type parameter requirements. However, these stricter type
* parameter requirements often lead to "excessively deep" TS compiler errors.
*/
export type PickDeepStrict<OriginalObjectGeneric extends object, DeepKeys extends NestedKeys<OriginalObjectGeneric>> = InnerPickDeep<OriginalObjectGeneric, DeepKeys>;
/** Pick nested keys. */
export type PickDeep<OriginalObjectGeneric extends object, DeepKeys extends PropertyKey[]> = InnerPickDeep<OriginalObjectGeneric, DeepKeys>;
{
"name": "@augment-vir/common",
"version": "19.6.0",
"version": "19.7.0",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -5,0 +5,0 @@ "bugs": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc