What is ts-toolbelt?
The ts-toolbelt package provides a comprehensive set of type utilities to improve TypeScript typing and enable type transformations, checks, and more complex operations. It enhances TypeScript's static typing capabilities and helps in building more robust type-safe applications.
What are ts-toolbelt's main functionalities?
Object Manipulation
Merge two types into one. This is useful for combining properties from multiple objects into a single type.
{ type Merged = Merge<{name: string}, {age: number}>; // Result: {name: string, age: number} }
Type Checking
Check if two types are equivalent. This utility helps in validating type structures for consistency.
{ type check = Equals<{a: string}, {a: string, b: number}>; // Result: false }
Conditional Types
Apply conditional logic to types. This feature allows for conditional type assignments based on certain conditions.
{ type Conditional = If<true, 'Yes', 'No'>; // Result: 'Yes' }
Other packages similar to ts-toolbelt
utility-types
Provides a collection of utility types for TypeScript, similar to ts-toolbelt. While utility-types focuses more on transformations and mappings, ts-toolbelt offers a broader range of type operations including type checks and advanced manipulations.
type-fest
A package that includes a variety of utility types for TypeScript. Type-fest is similar to ts-toolbelt but tends to be simpler and more focused on everyday use cases, whereas ts-toolbelt provides more comprehensive and complex utilities for advanced type manipulation.
ts-toolbelt
Higher type safety for TypeScript
Table of Contents
Introduction
View repository and user information, control your notifications and even manage your issues and pull requests. Built with React Native, GitPoint is one of the most feature-rich unofficial GitHub clients that is 100% free.
Available for both iOS and Android.
Features
A few of the things you can do with GitPoint:
- View user activity feed
- Communicate on your issue and pull request conversations
- Close or lock issues
- Apply labels and assignees
- Review and merge pull requests
- Create new issues
- Star, watch and fork repositories
- Control your unread and participating notifications
- Easily search for any user or repository
Contributors
This project follows the all-contributors specification and is brought to you by these awesome contributors.
Installation
npm install ts-toolbelt --save
yarn add ts-toolbelt