那麼在TypeScript 中如何定義上面的 prop 函式呢?我們來嘗試一下:. function prop(obj: object, key: string) { return obj[key]; }.
確定! 回上一頁