2016-09-21 06:27:11 -08:00
|
|
|
import {CONFIG_LOAD, CONFIG_RELOAD} from '../constants/config';
|
2023-06-26 01:29:50 -08:00
|
|
|
import type {HyperActions} from '../hyper';
|
|
|
|
|
import type {configOptions} from '../config';
|
2016-07-13 12:44:24 -08:00
|
|
|
|
2020-04-27 05:32:08 -08:00
|
|
|
export function loadConfig(config: configOptions): HyperActions {
|
2016-07-13 12:44:24 -08:00
|
|
|
return {
|
|
|
|
|
type: CONFIG_LOAD,
|
|
|
|
|
config
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-27 05:32:08 -08:00
|
|
|
export function reloadConfig(config: configOptions): HyperActions {
|
2017-11-14 14:55:21 -09:00
|
|
|
const now = Date.now();
|
2016-07-13 12:44:24 -08:00
|
|
|
return {
|
|
|
|
|
type: CONFIG_RELOAD,
|
2017-11-14 14:55:21 -09:00
|
|
|
config,
|
|
|
|
|
now
|
2016-07-13 12:44:24 -08:00
|
|
|
};
|
|
|
|
|
}
|