-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Идея в том, чтобы можно было добавлять дополнительные методы для работы с моделями фронтенда. Например:
class Product extends MapModel
{
/**
* Получить цену
*/
double getPrice() => this.get("price") |> default int 0;
}
class Basket<Product> extends VectorModel
{
/**
* Сумма корзины
*/
double getTotalPrice() => return lib::sum(
this.map( double (Product item) => item.getPrice() )
);
}
Metadata
Metadata
Assignees
Labels
No labels