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

Function finish

packages/vite/hmr/client/index.ts:1284–1297  ·  view source on GitHub ↗
(ok: boolean)

Source from the content-addressed store, hash-verified

1282 let done = false;
1283 const tWait = Date.now();
1284 const finish = (ok: boolean) => {
1285 if (done) return;
1286 done = true;
1287 try {
1288 a.off(a.activityStartedEvent || 'activityStarted', onAny);
1289 a.off(a.activityResumedEvent || 'activityResumed', onAny);
1290 } catch {}
1291 if (VERBOSE)
1292 console.log('[hmr-client] [android] readiness result', {
1293 ok,
1294 elapsedMs: Date.now() - tWait,
1295 });
1296 resolve(ok);
1297 };
1298 const onAny = (evt?: any) => {
1299 if (VERBOSE)
1300 console.log('[hmr-client] [android] activity event', {

Callers 2

onAnyFunction · 0.70
withEventsFunction · 0.70

Calls 3

offMethod · 0.65
resolveFunction · 0.50
logMethod · 0.45

Tested by

no test coverage detected