摘要: import { expect, it, vitest } from 'vitest'; interface User { id: number; name: string; } function printUser(user: User) { Object.keys(user).forEach(( 阅读全文
posted @ 2024-08-01 15:12 Zhentiw 阅读(4) 评论(0) 推荐(0) 编辑
摘要: interface User { id: number; name: string; } const users = [ { name: 'Waqas', }, { name: 'Zain', }, ]; const usersWithIds: User[] = users.map((user, i 阅读全文
posted @ 2024-08-01 14:46 Zhentiw 阅读(9) 评论(0) 推荐(0) 编辑