js_reverse/学习VUE/hello_vue3/笔记/自定义数据类型1.ts
2024-10-31 17:55:51 +08:00

10 lines
208 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 定义一个接口用于限制person对象的具体属性
export interface PersonInter {
id: string,
name: string,
age: number
}
// 自定义类型
export type Persons = Array<PersonInter>