(dirPath, fileNameOrInvokeMap, fileNames)
| 6572 | }; |
| 6573 | } |
| 6574 | function invokeCallbacks(dirPath, fileNameOrInvokeMap, fileNames) { |
| 6575 | var fileName; |
| 6576 | var invokeMap; |
| 6577 | if (ts.isString(fileNameOrInvokeMap)) { |
| 6578 | fileName = fileNameOrInvokeMap; |
| 6579 | } |
| 6580 | else { |
| 6581 | invokeMap = fileNameOrInvokeMap; |
| 6582 | } |
| 6583 | // Call the actual callback |
| 6584 | callbackCache.forEach(function (callbacks, rootDirName) { |
| 6585 | var _a; |
| 6586 | if (invokeMap && invokeMap.get(rootDirName) === true) |
| 6587 | return; |
| 6588 | if (rootDirName === dirPath || (ts.startsWith(dirPath, rootDirName) && dirPath[rootDirName.length] === ts.directorySeparator)) { |
| 6589 | if (invokeMap) { |
| 6590 | if (fileNames) { |
| 6591 | var existing = invokeMap.get(rootDirName); |
| 6592 | if (existing) { |
| 6593 | (_a = existing).push.apply(_a, fileNames); |
| 6594 | } |
| 6595 | else { |
| 6596 | invokeMap.set(rootDirName, fileNames.slice()); |
| 6597 | } |
| 6598 | } |
| 6599 | else { |
| 6600 | invokeMap.set(rootDirName, true); |
| 6601 | } |
| 6602 | } |
| 6603 | else { |
| 6604 | callbacks.forEach(function (_a) { |
| 6605 | var callback = _a.callback; |
| 6606 | return callback(fileName); |
| 6607 | }); |
| 6608 | } |
| 6609 | } |
| 6610 | }); |
| 6611 | } |
| 6612 | function nonSyncUpdateChildWatches(dirName, dirPath, fileName, options) { |
| 6613 | // Iterate through existing children and update the watches if needed |
| 6614 | var parentWatcher = cache.get(dirPath); |
no test coverage detected
searching dependent graphs…