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

Function getPlugin

src/core/platform-plugin/plugin.ts:162–168  ·  view source on GitHub ↗
(platform: Platform)

Source from the content-addressed store, hash-verified

160 * switch default threw, so routing through it is byte-identical.
161 */
162export function getPlugin(platform: Platform): PlatformPlugin {
163 const plugin = registry.get(platform);
164 if (!plugin) {
165 throw new AppError('UNSUPPORTED_PLATFORM', `Unsupported platform: ${platform}`);
166 }
167 return plugin;
168}
169
170/** Non-throwing lookup, for call-sites that branch on plugin presence. */
171export function tryGetPlugin(platform: Platform): PlatformPlugin | undefined {

Calls 1

getMethod · 0.80

Tested by

no test coverage detected