MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / tryResolve

Function tryResolve

packages/vite/helpers/esbuild-platform-resolver.ts:18–24  ·  view source on GitHub ↗
(candidate: string)

Source from the content-addressed store, hash-verified

16 const currentPlatform = opts?.platform === 'visionos' ? 'ios' : opts?.platform;
17
18 function tryResolve(candidate: string): string | undefined {
19 try {
20 return existsSync(candidate) ? candidate : undefined;
21 } catch {
22 return undefined;
23 }
24 }
25
26 function resolveWithPlatform(basePath: string): string | undefined {
27 const ext = path.extname(basePath);

Callers 1

resolveWithPlatformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected