MCPcopy Index your code
hub / github.com/nukeop/nuclear / subscribe

Method subscribe

packages/plugin-sdk/src/api/settings.ts:52–57  ·  view source on GitHub ↗
(
    id: string,
    listener: (value: T | undefined) => void,
  )

Source from the content-addressed store, hash-verified

50 }
51
52 subscribe<T extends SettingValue = SettingValue>(
53 id: string,
54 listener: (value: T | undefined) => void,
55 ) {
56 return this.#withHost((h) => h.subscribe<T>(id, listener));
57 }
58
59 registerWidget(widgetId: string, component: CustomWidgetComponent) {
60 if (!this.#widgetRegistry || !this.#pluginId) {

Callers

nothing calls this directly

Calls 1

#withHostMethod · 0.95

Tested by

no test coverage detected