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

Function requireInstance

packages/player/src/stores/pluginStore.tsx:51–60  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

49};
50
51const requireInstance = (id: string) => {
52 const plugin = usePluginStore.getState().plugins[id];
53 if (!plugin) {
54 throw new Error(`Plugin ${id} not found`);
55 }
56 if (!plugin.instance) {
57 throw new Error(`Plugin ${id} has no instance`);
58 }
59 return plugin;
60};
61
62type LoadedPluginData = {
63 metadata: PluginMetadata;

Callers 1

pluginStore.tsxFile · 0.85

Calls 1

getStateMethod · 0.80

Tested by

no test coverage detected