ts-toolbelt
Advanced tools
Comparing version 0.0.12 to 0.0.13
{ | ||
"name": "ts-toolbelt", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"license": "AGPL-3.0-only", | ||
@@ -5,0 +5,0 @@ "author": "Pierre-Antoine Mills", |
@@ -16,5 +16,43 @@ <center> | ||
type t = T.N.Minus<'0', '20'> // -20 | ||
// Do basic number operations | ||
type test0 = T.N.Minus<'5', '20'> // -15 | ||
type O = { | ||
a: { | ||
b: { | ||
c: 'hello' | ||
d: 'goodbye' | ||
} | ||
} | ||
} | ||
// Deeply change a type | ||
type test1 = T.O.P.Update<O, ['a', 'b', 'c' | 'd'], [1, 2, 3]> | ||
// Or just merge them | ||
type test2 = T.O.Merge<O, {x: 'hello'}> | ||
``` | ||
And so much more... But before you start reading the docs: | ||
The library is organized around TypeScript concepts: | ||
- T.**A**: **A**ny types | ||
- T.**B**: **B**oolean types | ||
- T.**C**: **C**lass types | ||
- T.**F**: **F**untion types | ||
- T.**I**: **I**teration types | ||
- T.**N**: **N**umber types | ||
- T.**O**: **O**bject types | ||
- T.**S**: **S**tring types | ||
- T.**T**: **T**uple types | ||
- T.**U**: **U**nion types | ||
```ts | ||
type test3 = T.A.Is<'hello', string> // true | ||
type test4 = T.A.Concat<[1, 2], [3, 4]> // [1, 2, 3, 4] | ||
``` | ||
# [Documentation](https://pirix-gh.github.io/ts-toolbelt/) |
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
150442
57