/* * @Description: * @FilePath: \base-framework\packages\store\src\context.ts * @Author: freud * @Date: 2023-07-11 09:16:30 * @LastEditTime: 2023-10-27 09:26:42 * @LastEditors: freud * @Reference: */ import { PageEnum } from '@eciol/shared'; import type { AnyNormalFunction, LocaleSetting, ProjectConfig } from '@eciol/types'; interface ContextOptions { useUserStore: any; PageEnum: typeof PageEnum; localeSetting?: LocaleSetting; projectSetting?: ProjectConfig; darkMode?: string; resetRouter?: any; useGo?: any; useRedo?: any; PAGE_NOT_FOUND_NAME?: string; REDIRECT_NAME?: string; } let context: ContextOptions = { useUserStore: () => {}, PageEnum, }; const initStoreSetting = (func: AnyNormalFunction) => { context = func(); }; export { context, initStoreSetting };