millsp/ts-toolbelt — dự án frontend — đang có 7.2k sao GitHub trong nhóm Frontend. 👷 TypeScript's largest type utility library
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
ts-toolbelt is the largest, and most tested type library available right
now, featuring +200 utilities. Our type collection packages some of the most
advanced mapped types, conditional types, and recursive types on the market.
Spend less time, build stronger. Benefit from a wide range of generic type
functions to achieve better type safety.
We work just like lodash, or ramda, but applied to the type system. Our mission
is to provide you with simple ways to compute, change, and create types. We
abstract all those complex type checks away for you. We provide a simple,
reusable, and standard API to help you get more done with TypeScript.
ts-toolbelt is a well organized package that can help you perform advanced
operations on object types, union types, as well as function, and literal types.
It is carefully and coherently designed for building robust, flexible, and
type-safe software.
We are a community and a knowledge base. Everyone is welcome to ask questions
about types. If you are stuck or you misunderstand something, you came to the
right place!. We welcome beginners and advanced developers to come take part.
Welcome!
Getting Started
Prerequisites
npm install typescript@^4.1.0 --save-dev
For best results, add this to your tsconfig.json
{
"compilerOptions": {
// highly recommended (required by few utilities)
"strictNullChecks": true,
// this is optional, but enable whenever possible
"strict": true,
// this is the lowest supported standard library
"lib": ["es2015"],
}
}
Installation
npm install ts-toolbelt --save
Hello World
import {Object} from "ts-toolbelt"
// Check the docs below for more
// Merge two `object` together
type merge = Object.Merge<{name: string}, {age?: number}>
// {name: string, age?: number}
// Make a field of an `object` optional
type optional = Object.Optional<{id: number, name: string}, "name">
// {id: number, name?: string}
You can level-up, and re-code this library from
scratch.
Documentation ⤢
Imports
The project is organized around TypeScript's main concepts:
Any
Boolean
Class
Function
Iteration
List
Number
Object
Object.P
String
Union
Test
TIP How to choose categories? Match your type with them.
There are many ways to import the types into your project:
millsp/ts-toolbelt thuộc nhóm Frontend trên TopGit, cùng 9 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về millsp/ts-toolbelt ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/millsp/ts-toolbelt là nguồn chính thức.
millsp/ts-toolbelt có bao nhiêu sao?
millsp/ts-toolbelt có 7.2k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/millsp/ts-toolbelt. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
millsp/ts-toolbelt có những chủ đề gì?
GitHub topics của millsp/ts-toolbelt: "dynamic-types", "safety", "type-checking", "type-safety", "type-utilities", "types", "typescript", "typescript-library", "utility". TopGit xếp repo vào nhóm Frontend.
millsp/ts-toolbelt còn đang phát triển không?
Commit gần nhất trên millsp/ts-toolbelt là 1.5 năm trước (theo timestamp GitHub). Repo có 152 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
millsp/ts-toolbelt viết bằng ngôn ngữ gì?
millsp/ts-toolbelt chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Vì sao millsp/ts-toolbelt được xếp vào nhóm Frontend?
TopGit xếp millsp/ts-toolbelt vào nhóm Frontend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "dynamic-types", "safety", "type-checking"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về ts-toolbelt?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về ts-toolbelt.