خرید بک لینک

Vote count: 0

I want to add Flow type aotations to a class containing a function defined in ES6 style, below is analyzed correctly:

/* @flow */
class Product {
  items: Array<string>;

  addItem = (item:string) => {
    this.items.push(item)
  };
}

If I add export default to export the Product class, I get:

class property `addItem` missing type aotation.

asked 35 secs ago

برچسب: نویسنده: استخدام کار تاريخ: سه شنبه 12 مرداد 1395 ساعت: 1:45

صفحه بندی