编程技术 TypeScript 报 Type ‘string | undefined’ is not assignable,可选字段怎么收窄 2026年11月9日 9823189 type User = { name?: string };…