MCPcopy Create free account
hub / github.com/eva-engine/eva.js / init

Method init

packages/plugin-evax/lib/EvaXSystem.ts:79–83  ·  view source on GitHub ↗

* 初始化系统 * * 设置全局 store 并绑定默认的事件监听器。 * * @param params - 初始化参数 * @param params.store - 初始的全局状态对象

({ store = {} } = { store: {} })

Source from the content-addressed store, hash-verified

77 * @param params.store - 初始的全局状态对象
78 */
79 init({ store = {} } = { store: {} }) {
80 this.ee = new EventEmitter();
81 this.store = store;
82 this.bindDefaultListener();
83 }
84 bindDefaultListener() {
85 this.ee.on('evax.updateStore', store => {
86 this.updateStore(store);

Callers

nothing calls this directly

Calls 1

bindDefaultListenerMethod · 0.95

Tested by

no test coverage detected