MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / tabItemSourceLocation

Function tabItemSourceLocation

packages/nativescript-inspector/src/index.ts:1486–1498  ·  view source on GitHub ↗
(
  tabView: View,
  item: JSONObject,
  index: number,
  sourceRoot = "",
)

Source from the content-addressed store, hash-verified

1484}
1485
1486function tabItemSourceLocation(
1487 tabView: View,
1488 item: JSONObject,
1489 index: number,
1490 sourceRoot = "",
1491): JSONObject | null {
1492 const direct = item.sourceLocation as JSONObject | null | undefined;
1493 return (
1494 direct ||
1495 sourceLocationForView(item.view, sourceRoot) ||
1496 sourceLocationForView(nativeScriptChildAt(tabView, index), sourceRoot)
1497 );
1498}
1499
1500function nativeScriptChildAt(view: View, targetIndex: number): View | null {
1501 return nativeScriptChildren(view)[targetIndex] ?? null;

Callers 2

Calls 2

sourceLocationForViewFunction · 0.85
nativeScriptChildAtFunction · 0.85

Tested by

no test coverage detected