Skip to content

Commit 7ac6444

Browse files
committed
Update docs with 400+ utilities and new features
1 parent 039311c commit 7ac6444

2 files changed

Lines changed: 32 additions & 8 deletions

File tree

docs/index.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ titleTemplate: Universal TypeScript Type Utilities
66
hero:
77
name: uni-types
88
text: TypeScript Type Utilities
9-
tagline: A comprehensive collection of type helpers for TypeScript development - 50+ utility types for safer, cleaner code
9+
tagline: A comprehensive collection of 400+ type utilities for TypeScript development - safer, cleaner, more expressive code
1010
image:
1111
src: /logo.svg
1212
alt: uni-types
@@ -24,7 +24,7 @@ hero:
2424
features:
2525
- icon: 🎯
2626
title: Comprehensive
27-
details: 50+ utility types covering core operations, deep transformations, type guards, inference, and more.
27+
details: 400+ utility types covering core operations, deep transformations, type guards, algorithms, parsers, state machines, and more.
2828
- icon: 🔒
2929
title: Type Safe
3030
details: Full TypeScript support with complete type definitions. Catch errors at compile time.
@@ -34,18 +34,27 @@ features:
3434
- icon: 📦
3535
title: Tree-shakable
3636
details: Import only the types you need. Works perfectly with bundlers.
37+
- icon: 🧮
38+
title: Type-Level Algorithms
39+
details: Sort, QuickSort, MergeSort, GCD, LCM, Factorial, Fibonacci, and more implemented at type level.
3740
- icon: 🔄
3841
title: Deep Operations
39-
details: DeepPartial, DeepRequired, DeepReadonly, DeepMutable for nested object transformations.
42+
details: DeepPartial, DeepRequired, DeepReadonly, DeepMutable, DeepOmit, DeepPick for nested objects.
4043
- icon: 🛠️
4144
title: Type Guards
4245
details: IsArray, IsTuple, IsEqual, IsAny, IsNever, IsUnknown for type checking.
46+
- icon: 🗃️
47+
title: Data Structures
48+
details: Tree, Graph, LinkedList, Stack, Queue types for modeling complex data.
49+
- icon: 🔌
50+
title: Schema Integration
51+
details: Built-in support for Zod and Yup schema type extraction and manipulation.
4352
---
4453

4554
## Quick Example
4655

4756
```typescript
48-
import type { PickRequired, DeepPartial, IsArray } from 'uni-types'
57+
import type { PickRequired, DeepPartial, Sort, IsArray } from 'uni-types'
4958

5059
// Make specific properties required
5160
interface User {
@@ -68,6 +77,9 @@ interface Config {
6877
type PartialConfig = DeepPartial<Config>
6978
// { database?: { host?: string; port?: number } }
7079

80+
// Type-level sorting algorithm
81+
type Sorted = Sort<[3, 1, 4, 1, 5]> // [1, 1, 3, 4, 5]
82+
7183
// Type guards for conditional logic
7284
type Check = IsArray<string[]> // true
7385
```

docs/zh/index.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ titleTemplate: 通用 TypeScript 类型工具库
66
hero:
77
name: uni-types
88
text: TypeScript 类型工具库
9-
tagline: 全面的 TypeScript 类型助手集合 - 50+ 实用类型工具,让你的代码更安全、更简洁
9+
tagline: 全面的 400+ 类型工具集合 - 让你的代码更安全、更简洁、更具表达力
1010
image:
1111
src: /logo.svg
1212
alt: uni-types
@@ -24,7 +24,7 @@ hero:
2424
features:
2525
- icon: 🎯
2626
title: 全面覆盖
27-
details: 50+ 实用类型工具,涵盖核心操作、深度转换、类型判断、类型推导等
27+
details: 400+ 实用类型工具,涵盖核心操作、深度转换、类型判断、算法、解析器、状态机等
2828
- icon: 🔒
2929
title: 类型安全
3030
details: 完整的 TypeScript 类型定义,编译时捕获错误。
@@ -34,18 +34,27 @@ features:
3434
- icon: 📦
3535
title: Tree-shakable
3636
details: 按需导入,配合打包工具自动优化。
37+
- icon: 🧮
38+
title: 类型级算法
39+
details: Sort、QuickSort、MergeSort、GCD、LCM、Factorial、Fibonacci 等类型级别实现。
3740
- icon: 🔄
3841
title: 深度操作
39-
details: DeepPartial、DeepRequired、DeepReadonly、DeepMutable 支持嵌套对象转换
42+
details: DeepPartial、DeepRequired、DeepReadonly、DeepMutable、DeepOmit、DeepPick 支持嵌套对象
4043
- icon: 🛠️
4144
title: 类型判断
4245
details: IsArray、IsTuple、IsEqual、IsAny、IsNever、IsUnknown 类型级别检查。
46+
- icon: 🗃️
47+
title: 数据结构
48+
details: Tree、Graph、LinkedList、Stack、Queue 等类型,用于建模复杂数据。
49+
- icon: 🔌
50+
title: Schema 集成
51+
details: 内置 Zod 和 Yup schema 类型提取与操作支持。
4352
---
4453

4554
## 快速示例
4655

4756
```typescript
48-
import type { PickRequired, DeepPartial, IsArray } from 'uni-types'
57+
import type { PickRequired, DeepPartial, Sort, IsArray } from 'uni-types'
4958

5059
// 将指定属性变为必需
5160
interface User {
@@ -68,6 +77,9 @@ interface Config {
6877
type PartialConfig = DeepPartial<Config>
6978
// { database?: { host?: string; port?: number } }
7079

80+
// 类型级别排序算法
81+
type Sorted = Sort<[3, 1, 4, 1, 5]> // [1, 1, 3, 4, 5]
82+
7183
// 类型判断
7284
type Check = IsArray<string[]> // true
7385
```

0 commit comments

Comments
 (0)