hyper/lib/actions/config.ts

20 lines
464 B
TypeScript
Raw Permalink Normal View History

2023-07-25 09:30:19 -08:00
import type {configOptions} from '../../typings/config';
2023-07-25 02:39:11 -08:00
import {CONFIG_LOAD, CONFIG_RELOAD} from '../../typings/constants/config';
2023-07-25 01:39:51 -08:00
import type {HyperActions} from '../../typings/hyper';
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
};
}