前后端联调测试第一个ts接口

This commit is contained in:
Guwan 2024-12-07 13:03:57 +08:00
parent 2db10bf25b
commit 4d592db87e
1 changed files with 26 additions and 0 deletions

View File

@ -8,7 +8,33 @@ import type { ApiResponse, PageResult } from './types'
*
* :
* 使 interface
*
*
*
* 使 Partial<T>
*
* Partial<T> TypeScript TypeScript T T 使 Partial<T>
*
* Person
*
* typescript
* type Person = {
* name: string;
* age: number;
* };
* 使 Partial<T> PartialPerson name age
*
* typescript
* type PartialPerson = Partial<Person>;
* PartialPerson name age
*
* typescript
* let person1: PartialPerson = { name: "Alice" }; // 正确
* let person2: PartialPerson = { age: 30 }; // 正确
* let person3: PartialPerson = {}; // 正确
* Partial<T>
*
*
* 使 0 | 1
* :
* request.get<T>() - GET请求