MCPcopy
hub / github.com/vitejs/vite / checkWatched

Function checkWatched

playground/hmr-ssr/__tests__/hmr-ssr.spec.ts:1092–1098  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1090function waitForWatcher(server: ViteDevServer, watched: string) {
1091 return new Promise<void>((resolve) => {
1092 function checkWatched() {
1093 if (isWatched(server, watched)) {
1094 resolve()
1095 } else {
1096 setTimeout(checkWatched, 20)
1097 }
1098 }
1099 checkWatched()
1100 })
1101}

Callers 1

waitForWatcherFunction · 0.85

Calls 2

isWatchedFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected