export default () => (<div>hi</div>)
I'd like to annotate it as a react stateless function without giving it a name.
A named example would be:
const it: React.SFC = () => (<div>hi</div>)
export default it;
export default () => (<div>hi</div>)
I'd like to annotate it as a react stateless function without giving it a name.
A named example would be:
const it: React.SFC = () => (<div>hi</div>)
export default it;
The types of variables declared within export default
statements can be asserted using as
export default (() => <div>Hi</div>) as React.SFC<{}>
You don't.
And stackoverflow won't accept answers that don't have at least 30 characters.