UNPKG

742 BJavaScriptView Raw
1// @flow
2
3export const types = {
4 SET_PERCENTAGE: 'loadingScreen/SET_PERCENTAGE',
5 ADD_PERCENTAGE: 'loadingScreen/ADD_PERCENTAGE',
6};
7
8export type SetPercentageActionType = {|
9 type: types.SET_PERCENTAGE,
10 percentage: ?number,
11|};
12export function setPercentage(percentage: ?number): SetPercentageActionType {
13 return {
14 type: types.SET_PERCENTAGE,
15 percentage,
16 };
17}
18
19export type AddPercentageActionType = {|
20 type: types.ADD_PERCENTAGE,
21 addValue: number,
22|};
23export function addPercentage(addValue: ?number): AddPercentageActionType {
24 return {
25 type: types.ADD_PERCENTAGE,
26 addValue,
27 };
28}
29
30export type LoadingScreenActionsType = SetPercentageActionType | AddPercentageActionType;