标签: typescript
这是一个人为的示例,但是我必须在这里强制转换似乎不对吗?
const keyValue = <K extends string, V>(k: K, v: V): {[k in K]: V } => ({[k]: v} as {[k in K]: V })