(name: string)
| 5 | g['__NS_DEV_PLACEHOLDER_ROOT_EARLY__'] = true; |
| 6 | try { |
| 7 | const getCore = (name: string): any => { |
| 8 | try { |
| 9 | const reg = g.__nsVendorRegistry; |
| 10 | const req = reg?.get ? g.__nsVendorRequire || g.__nsRequire || g.require : g.__nsRequire || g.require; |
| 11 | let mod: any = null; |
| 12 | if (reg && reg.has('@nativescript/core')) mod = reg.get('@nativescript/core'); |
| 13 | else if (typeof req === 'function') { |
| 14 | try { |
| 15 | mod = req('@nativescript/core'); |
| 16 | } catch {} |
| 17 | } |
| 18 | const ns = (mod && (mod.default ?? mod)) || mod; |
| 19 | if (name === 'Application' && ns && (ns.Application || ns)) return ns.Application || ns; |
| 20 | if (ns && ns[name]) return ns[name]; |
| 21 | } catch {} |
| 22 | try { |
| 23 | const nr = g.__nativeRequire; |
| 24 | if (typeof nr === 'function') { |
| 25 | try { |
| 26 | const mod = nr('@nativescript/core', '/'); |
| 27 | const ns = (mod && (mod.default ?? mod)) || mod; |
| 28 | if (name === 'Application' && ns && (ns.Application || ns)) return ns.Application || ns; |
| 29 | if (ns && ns[name]) return ns[name]; |
| 30 | } catch {} |
| 31 | } |
| 32 | } catch {} |
| 33 | return undefined; |
| 34 | }; |
| 35 | const Application = getCore('Application'); |
| 36 | const Frame = getCore('Frame'); |
| 37 | const Page = getCore('Page'); |
no test coverage detected