MCPcopy Index your code
hub / github.com/callstack/agent-device / registerPlatformPlugin

Function registerPlatformPlugin

src/core/platform-plugin/plugin.ts:148–155  ·  view source on GitHub ↗
(plugin: PlatformPlugin)

Source from the content-addressed store, hash-verified

146 * last-writer-wins.
147 */
148export function registerPlatformPlugin(plugin: PlatformPlugin): void {
149 for (const platform of plugin.platforms) {
150 if (registry.has(platform)) {
151 throw new Error(`PlatformPlugin already registered for platform "${platform}"`);
152 }
153 registry.set(platform, plugin);
154 }
155}
156
157/**
158 * Returns the plugin for `platform`, throwing the SAME `UNSUPPORTED_PLATFORM`

Callers 2

parity.test.tsFile · 0.90

Calls 1

setMethod · 0.80

Tested by

no test coverage detected