(_, key)
| 30 | |
| 31 | export const pluginProxy: any = new Proxy({} as any, { |
| 32 | get(_, key) { |
| 33 | if (!ctx.active) throw new Error('[varlock] No active plugin context — are you importing plugin-lib outside of a plugin module?'); |
| 34 | const val = ctx.active[key]; |
| 35 | return typeof val === 'function' ? val.bind(ctx.active) : val; |
| 36 | }, |
| 37 | set(_, key, value) { |
| 38 | if (!ctx.active) throw new Error('[varlock] No active plugin context'); |
| 39 | ctx.active[key] = value; |
nothing calls this directly
no outgoing calls
no test coverage detected