MCPcopy Index your code
hub / github.com/react/react / canViewElementSourceFunction

Function canViewElementSourceFunction

packages/react-devtools-core/src/standalone.js:146–156  ·  view source on GitHub ↗
(
  _source: ReactFunctionLocation | ReactCallSite,
  symbolicatedSource: ReactFunctionLocation | ReactCallSite | null,
)

Source from the content-addressed store, hash-verified

144}
145
146function canViewElementSourceFunction(
147 _source: ReactFunctionLocation | ReactCallSite,
148 symbolicatedSource: ReactFunctionLocation | ReactCallSite | null,
149): boolean {
150 if (symbolicatedSource == null) {
151 return false;
152 }
153 const [, sourceURL, ,] = symbolicatedSource;
154
155 return doesFilePathExist(sourceURL, projectRoots);
156}
157
158function viewElementSourceFunction(
159 _source: ReactFunctionLocation | ReactCallSite,

Callers 1

useOpenResourceFunction · 0.85

Calls 1

doesFilePathExistFunction · 0.90

Tested by

no test coverage detected