While checking the source of one open source project (react data grid), I've stumbled upon this syntax which I couldn't wrap my head around:
class EditorBase extends React.Component {
getStyle(): {width: string} {
return {
width: '100%'
};
}
Especially the getStyle(): {
part.
I've tried to consult other SO questions, MDN function and classes references but didn't any mentions of the above syntax.
What am I missing here?