在檢查一個開源項目(react data grid)的來源,我已經在這個語法,我不能環繞我的頭跌跌撞撞:的JavaScript - ES6語法
class EditorBase extends React.Component {
getStyle(): {width: string} {
return {
width: '100%'
};
}
尤其是getStyle(): {
部分。
我試着諮詢其他SO問題,MDN function和classes引用,但沒有提及上述語法。
缺少什麼我在這裏?
https://flow.org/ –