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

@alloc/types

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alloc/types - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

13

index.d.ts

@@ -52,2 +52,11 @@ /** Try to simplify `&` out of an object type */

/** Pick keys from a union of objects */
export type UnionPick<T, K> = Pick<
T extends any
? Intersect<K extends keyof T ? T : { [P in K & keyof any]?: undefined }>
: never,
// @ts-ignore
K
>
/** Get the keys of each object type in a given union */

@@ -57,5 +66,3 @@ export type AllKeys<T> = T extends any ? keyof T : never

/** Merge all object types in a given union. Property types are unioned. */
export type CombineObjects<T> = [AllKeys<T>] extends [infer U]
? { [P in U & string]: CombineProp<T, P> }
: never
export type CombineObjects<T> = UnionPick<T, AllKeys<T>>

@@ -62,0 +69,0 @@ /**

{
"name": "@alloc/types",
"version": "2.1.0",
"version": "2.2.0",
"types": "index.d.ts",

@@ -5,0 +5,0 @@ "files": [

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