MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / destroy

Method destroy

packages/core/src/engine/editor.ts:154–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152 }
153
154 destroy() {
155 if (!this.config) {
156 return
157 }
158
159 try {
160 const { lifeCycles = {} } = this.config
161 this.unregisterHooks()
162 lifeCycles?.destroy?.(this)
163 } catch (err) {
164 logger.warn(err)
165 }
166
167 this.eventBus.emit(EDITOR_EVENT.DESTROY)
168 }
169
170 async extend(pluginManager: Plugins) {
171 this.eventBus.emit(EDITOR_EVENT.BEFORE_EXTEND)

Callers

nothing calls this directly

Calls 3

warnMethod · 0.80
destroyMethod · 0.65
emitMethod · 0.45

Tested by

no test coverage detected