type userKeyType = keyof typeof user; // "name" | "age" Object.keys(user).forEach((key) => { console.log(user[key as userKeyType]) }).
確定! 回上一頁