You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { createStore } from "redux";
|
|
|
|
// import { createContext, Context } from "react";
|
|
|
|
import { reducer } from "./reducers";
|
|
|
|
import { IStore } from "./type";
|
|
|
|
import { EditorAction } from "./actions";
|
|
|
|
import { GlobelController } from "./GlobalController";
|
|
|
|
|
|
|
|
export * from "./type";
|
|
|
|
export * from "./selectors";
|
|
|
|
export * from "./constants";
|
|
|
|
|
|
|
|
export { EditorAction };
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
store: IStore;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const store: IStore = createStore(reducer);
|
|
|
|
|
|
|
|
export const globalController = new GlobelController(store);
|
|
|
|
|
|
|
|
window.store = store;
|
|
|
|
|
|
|
|
// export const StoreContext = createContext<IStore | null>(
|
|
|
|
// null
|
|
|
|
// ) as Context<IStore>;
|