jkchao / typescript-book-chinese

TypeScript Deep Dive 中文版
https://jkchao.github.io/typescript-book-chinese/
MIT License
6.53k stars 673 forks source link

fix: 修复示例错误 #283

Open DouMJun opened 1 year ago

DouMJun commented 1 year ago

原文:

if it's user names you can do { [username:string] : {message: string} } to help the next dev who looks at the code (which just might happen to be you)

本文:

如果有一个用户名,你可以使用 { username: string}: { message: string },这有利于下一个开发者理解你的代码。