MCPcopy
hub / github.com/nukeop/nuclear / registerWidget

Method registerWidget

packages/plugin-sdk/src/api/settings.ts:59–64  ·  view source on GitHub ↗
(widgetId: string, component: CustomWidgetComponent)

Source from the content-addressed store, hash-verified

57 }
58
59 registerWidget(widgetId: string, component: CustomWidgetComponent) {
60 if (!this.#widgetRegistry || !this.#pluginId) {
61 throw new Error('Widget registry not available');
62 }
63 this.#widgetRegistry.register(this.#pluginId, widgetId, component);
64 }
65
66 unregisterWidget(widgetId: string) {
67 if (!this.#widgetRegistry || !this.#pluginId) {

Callers

nothing calls this directly

Calls 1

registerMethod · 0.45

Tested by

no test coverage detected