MCPcopy Create free account
hub / github.com/chieapp/chie / registerView

Method registerView

src/controller/service-manager.ts:64–70  ·  view source on GitHub ↗
(viewClass: BaseViewType)

Source from the content-addressed store, hash-verified

62 }
63
64 registerView(viewClass: BaseViewType) {
65 if (!Object.prototype.isPrototypeOf.call(BaseView, viewClass))
66 throw new Error('Registered View must inherit from BaseView.');
67 if (this.#views.find(v => v.name == viewClass.name))
68 throw new Error(`View "${viewClass.name}" has already been registered.`);
69 this.#views.push(viewClass);
70 }
71
72 unregisterView(viewClass: BaseViewType) {
73 if (!this.#views.includes(viewClass))

Callers 3

beforeAllFunction · 0.80
guiMainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected