Socket
Socket
Sign inDemoInstall

@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

Common types for TypeScript


Version published
Maintainers
1
Created
Source

@alloc/types

Common types for TypeScript

Basic

  • Solve<T> for solving generic types

  • Remap<T> to simplify & out of an object type

  • Pick<T, K> the same as built-in Pick but wrapped with Solve

  • Overwrite<T, U> for merging two object types (where U takes precedence)

  • MergeUnknown<T, U> for merging two object types (where T takes precedence)

  • MergeDefaults<T, U> for making T properties optional if they exist in U

React

  • ElementType<P> as a workaround for #34237

  • ComponentPropsWithRef<T> which uses ElementType

FAQs

Package last updated on 22 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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