ts-toolbelt
Advanced tools
Comparing version 1.0.30 to 1.0.31
{ | ||
"name": "ts-toolbelt", | ||
"version": "1.0.30", | ||
"version": "1.0.31", | ||
"license": "Apache-2.0", | ||
@@ -48,3 +48,3 @@ "author": "Pierre-Antoine Mills", | ||
"typedoc": "^0.14.2", | ||
"typescript": "^3.5.0" | ||
"typescript": "^3.5.2" | ||
}, | ||
@@ -51,0 +51,0 @@ "peerDependencies": { |
@@ -45,3 +45,3 @@ <p align="center"> | ||
- [Motivation](#motivation) | ||
- [About](#about) | ||
- [Features](#features) | ||
@@ -53,34 +53,78 @@ - [Getting started](#getting-started) | ||
- [Running tests](#running-tests) | ||
- [Compatibility](#compatibility) | ||
- [What's next](#whats-next) | ||
- [Acknowledgments](#acknowledgments) | ||
- [What's next](#whats-next) | ||
- [Contact](#contact) | ||
- [Licence](#licence) | ||
## Motivation | ||
## About | ||
**ts-toolbelt** is a collection of types that makes programming with TypeScript even safer. | ||
It's goal is to ensure type correctness without too much effort from | ||
your part, while adding a whole new set of features to TypeScript. | ||
### How? | ||
**ts-toolbelt** performs complex operations on types. It's API exposes types that will trade your CPU & RAM for a higher type safety. | ||
### Demo | ||
## Features | ||
* A | ||
* B | ||
* C | ||
* Feature request | ||
Only the most useful features are mentioned here. You will find the complete | ||
list in the [documentation](https://pirix-gh.github.io/ts-toolbelt/) website. | ||
* Merge two types together (doc) | ||
* Update the field of a type (doc) | ||
* Make some fields optional (doc) | ||
* Change a type at any depth! (doc) | ||
* Concat two tuples together (doc) | ||
* Get the last item of a tuple (doc) | ||
* ... and so much more | ||
One of the goals of **ts-toolbelt** is to bring all the types one would ever | ||
need to a single package. | ||
If you don't find the type you were looking for, please feel welcome to open | ||
a [feature request](https://github.com/pirix-gh/ts-toolbelt/issues/new?template=---feature-request.md)! | ||
## Getting Started | ||
The project is maintained to adapt to the constant changes of TypeScript. See [compatibility](#compatibility) for more information. | ||
### Prerequisites | ||
```sh | ||
npm install typescript@^3.5.0 --save | ||
``` | ||
### Installation | ||
```sh | ||
```sh | ||
npm install ts-toolbelt --save | ||
``` | ||
``` | ||
```sh | ||
yarn add ts-toolbelt | ||
``` | ||
### Hello World | ||
### Demo | ||
```ts | ||
import tb from 'ts-toolbelt' | ||
type merged = tb.O.Merge<{name: string}, {age: number}> | ||
// {name: string, age: number} | ||
type concat = tb.T.Concat<['hello'], ['world']> | ||
// ['hello', 'world'] | ||
``` | ||
## Documentation | ||
Right above, you might have notices that we've used `O` and `T` to access the | ||
tools. They stand for **O**bject and **T**uple, respectively. And the whole | ||
library is organized the same way, around TypeScript concepts: | ||
- A[ny] | ||
- B[boolean] | ||
- | ||
https://pirix-gh.github.io/ts-toolbelt/ | ||
@@ -99,2 +143,4 @@ | ||
## Compatibility | ||
## What's next | ||
@@ -101,0 +147,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
111898
148