i want add flow type annotations class containing function defined in es6 style, below analyzed correctly:
/* @flow */ class product { items: array<string>; additem = (item:string) => { this.items.push(item) }; }
if add export default
export product class, get:
class property `additem` missing type annotation.
it turns out had old version of flow installed globally @ 0.23.0, incompatible. upgrading flow 0.30.0 fixed issue.
Comments
Post a Comment