ts 中 type 和 interface 的区别type 可以用于基本类型、联合类型、元组,但 interface 不能:
// ✅ type 支持联合类型
type ID = string | number;
// ✅ type 支持
2025-04-02