hyper/lib/actions/config.ts

20 lines
421 B
TypeScript
Raw Normal View History

import {CONFIG_LOAD, CONFIG_RELOAD} from '../constants/config';
2020-01-02 09:27:27 -09:00
import {HyperActions} from '../hyper';
2020-04-27 05:32:08 -08:00
import {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 {
const now = Date.now();
2016-07-13 12:44:24 -08:00
return {
type: CONFIG_RELOAD,
config,
now
2016-07-13 12:44:24 -08:00
};
}