// @ts-nocheck import React from 'react'; import initialState from '/Users/zhaolinxiao/workspace/lwj-common-frontend/lwj-react/lwj-editor/src/.umi/plugin-initial-state/models/initialState'; // @ts-ignore import Dispatcher from './helpers/dispatcher'; // @ts-ignore import Executor from './helpers/executor'; // @ts-ignore import { UmiContext } from './helpers/constant'; export const models = { '@@initialState': initialState, }; export type Model = { [key in keyof typeof models]: ReturnType; }; export type Models = Model[T] const dispatcher = new Dispatcher!(); const Exe = Executor!; export default ({ children }: { children: React.ReactNode }) => { return ( { Object.entries(models).map(pair => ( { const [ns] = pair as [keyof typeof models, any]; dispatcher.data[ns] = val; dispatcher.update(ns); }} /> )) } {children} ) }