获取TS7053:元素隐式地具有“ any”类型,因为不能将类型为“ string”的表达式 用于索引类型“ rowType”。找不到参数类型为“字符串”的索引签名 输入“ rowType”。 此行上的错误{rowData [key]}
import * as React from "react"
interface rowType {
id: number;
name: string;
title: string;
completed: boolean;
}
export interface RowProps { rowData: rowType};
const Row = ({ rowData }: RowProps) => {
return (
<>
{Object.keys(rowData).map((key:) =>(
<div> {rowData[key]}</div>
))}
</>
)
}
export default Row;