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