Socket
Socket
Sign inDemoInstall

hotypes

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hotypes

Higher order types for TypeScript


Version published
Weekly downloads
768
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

hotypes

Higher-order types for TypeScript in the real world.

Motivation

TypeScripts type system is Turing-complete.

If you don't follow the real-world use cases to create higher-order types, you will create a lot of useless new macros.

Some people, when confronted with a type problem, think "I know, I'll use advanced types." Now they have two type problems.

Higher-order types are difficult, so we should not further complicate or mystify them.

The difference with justypes

hotypes are more like verbs or operators.

Install

npm install --save hotypes
# or
yarn add hotypes

API

It is highly recommended to read test cases to make sure you understand what types exactly do.

  • Equals
  • FunctionKeys
  • Head
  • KeysByType
  • KeysExcludeByType
  • KeysExcludeExtendType
  • KeysExtendType
  • Last
  • MapNullablePropsToOptionalNullable
  • MapNullablePropsToOptional
  • MapProps
  • MapPropsByKeyToNonOptional
  • MapPropsByKeyToOptional
  • MapPropsByKey
  • MapPropsByType
  • MapPropsExtendType
  • MapPropsToNonNullable
  • Mixin
  • MixinAll
  • NonNullableKeys
  • NullableKeys
  • OmitPropsByType
  • OmitPropsExtendType
  • OptionalKeys
  • PickNonNever
  • ReplacePropsByKey
  • ReplacePropsByType
  • ReplaceType
  • ReturnTypeOfConstructor
  • Tail
  • WithDefault
  • NonCallable

Keywords

FAQs

Package last updated on 31 Aug 2022

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