aretherecookies-mobile/js/constants/QuantityConstants.js

18 lines
561 B
JavaScript
Raw Normal View History

2017-11-11 20:15:19 -06:00
// @flow
export const QUANTITY_NONE: 'none' = 'none';
export const QUANTITY_FEW: 'few' = 'few';
export const QUANTITY_MANY: 'many' = 'many';
export const QUANTITY_LOTS: 'lots' = 'lots';
2017-11-11 20:15:19 -06:00
export const QUANTITIES = [QUANTITY_NONE, QUANTITY_FEW, QUANTITY_LOTS, QUANTITY_MANY];
export type Quantity = typeof QUANTITY_NONE | typeof QUANTITY_FEW | typeof QUANTITY_MANY | typeof QUANTITY_LOTS;
export type QuantityResponse = {
food_item_id: string,
quantity: Quantity,
date: number,
};
export type QuantityFragment = { quantity: Quantity, lastupdated: number };