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

type-plus

Package Overview
Dependencies
Maintainers
1
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-plus

Provides additional types for `typescript`.

  • 1.10.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22K
increased by1.87%
Maintainers
1
Weekly downloads
 
Created
Source

type-plus

unstable NPM version NPM downloads

Circle CI Travis CI Codecov Coveralls Status

Greenkeeper Semantic Release

Visual Studio Code Wallaby.js

Provides additional types and type adjusted utilities for typescript

API

Identity type

  • Id<T>: generic Id type
  • createId<T>(type: T, value: string): Id<T>: create id
  • createIdCreator<T>(type: T): (value: string) => Id<T>: create an id creator

Object Key functions

  • KeyTypes<T>: type of all keys.
  • filterKey(): type adjusted filter by key.
  • findKey(): type adjusted find by key.
  • forEachKey(): type adjusted for each by key.
  • mapKey(): type adjusted map by key.
  • reduceKey(): type adjusted reduce by key.

Array function

  • literalArray(...entries): return an array those items are restricted to the provided literals.

Promise function

  • isPromise<R>(subject: any): isPromise() type guard.

Type manipulation

  • ExcludePropType<T, U>: excludes type U from properties in T.
  • PartialPick<T, U>: makes the properties specified in U becomes optional.
  • PartialExcept<T, U>: makes the properties not specified in U becomes optional.
  • RecursivePartial<T>: make type T optional recursively.
  • RecursiveRequired<T>: make type T required recursively.
  • RequiredPick<T, U>: makes the properties specified in U becomes required.
  • RequiredExcept<T, U>: makes the properties not specified in U becomes required.
  • RecursiveIntersect<T, U>: intersect type U onto T recursively.
  • ValueOf<T>: type of the value of the properties of T.

Contribute

# after fork and clone
npm install

# begin making changes
git checkout -b <branch>
npm run watch

# after making change(s)
git commit -m "<commit message>"
git push

# create PR

FAQs

Package last updated on 31 Jan 2019

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