MCPcopy Index your code
hub / github.com/ionic-team/capacitor / loadPluginImplementation

Function loadPluginImplementation

core/src/runtime.ts:62–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 let jsImplementation: any;
61
62 const loadPluginImplementation = async (): Promise<any> => {
63 if (!jsImplementation && platform in jsImplementations) {
64 jsImplementation =
65 typeof jsImplementations[platform] === 'function'
66 ? (jsImplementation = await jsImplementations[platform]())
67 : (jsImplementation = jsImplementations[platform]);
68 } else if (capCustomPlatform !== null && !jsImplementation && 'web' in jsImplementations) {
69 jsImplementation =
70 typeof jsImplementations['web'] === 'function'
71 ? (jsImplementation = await jsImplementations['web']())
72 : (jsImplementation = jsImplementations['web']);
73 }
74
75 return jsImplementation;
76 };
77
78 const createPluginMethod = (impl: any, prop: PropertyKey): ((...args: any[]) => any) => {
79 if (pluginHeader) {

Callers 1

wrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected