MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / parse

Method parse

packages/core/ui/builder/index.ts:108–117  ·  view source on GitHub ↗
(value: string | Template, context?: any)

Source from the content-addressed store, hash-verified

106 }
107
108 static parse(value: string | Template, context?: any): View {
109 if (typeof value === 'function') {
110 return (<Template>value)();
111 } else {
112 const exports = context ? getExports(context) : undefined;
113 const componentModule = parseInternal(value, exports);
114
115 return componentModule && componentModule.component;
116 }
117 }
118
119 /**
120 * Loads component from module with context

Callers

nothing calls this directly

Calls 2

getExportsFunction · 0.85
parseInternalFunction · 0.85

Tested by

no test coverage detected