LogoRobo.js
Framework

wrapModelWithPluginAccess()

Function: wrapModelWithPluginAccess()

function wrapModelWithPluginAccess<T>(model): T & {
  pluginContext: (name) => PluginContext;
}

Wrap a model proxy to include plugin context access.

This allows models to access plugin contexts via model.pluginContext(name).

Type Parameters

Type Parameter
T extends { id: string; }

Parameters

ParameterType
modelT & { pluginContext: (name) => PluginContext; }

Returns

T & { pluginContext: (name) => PluginContext; }

On this page