MCPcopy Index your code
hub / github.com/nodejs/node / onSourceFileChange

Function onSourceFileChange

test/fixtures/snapshot/typescript.js:123846–123855  ·  view source on GitHub ↗
(fileName, eventKind, path)

Source from the content-addressed store, hash-verified

123844 return watchFile(file, function (fileName, eventKind) { return callback(fileName, eventKind, path); }, pollingInterval, options, watchType);
123845 }
123846 function onSourceFileChange(fileName, eventKind, path) {
123847 updateCachedSystemWithFile(fileName, path, eventKind);
123848 // Update the source file cache
123849 if (eventKind === ts.FileWatcherEventKind.Deleted && sourceFilesCache.has(path)) {
123850 resolutionCache.invalidateResolutionOfFile(path);
123851 }
123852 nextSourceFileVersion(path);
123853 // Update the program
123854 scheduleProgramUpdate();
123855 }
123856 function updateCachedSystemWithFile(fileName, path, eventKind) {
123857 if (cachedDirectoryStructureHost) {
123858 cachedDirectoryStructureHost.addOrDeleteFile(fileName, path, eventKind);

Callers

nothing calls this directly

Calls 4

nextSourceFileVersionFunction · 0.85
scheduleProgramUpdateFunction · 0.85
hasMethod · 0.65

Tested by

no test coverage detected