Skip to content

Commit

Permalink
More comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vedantroy authored and JLHwung committed Nov 17, 2021
1 parent dcbb5ae commit 344860b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/babel-cli/src/babel/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ function subtract(minuend: Set<string>, subtrahend: Set<string>): string[] {
return diff;
}

/**
* Register new external dependencies with the file system
* watcher (chokidar).
*/
const watchNewExternalDependencies = (() => {
let prevDeps = null;
return (filePath: string) => {
Expand Down Expand Up @@ -158,6 +162,13 @@ const getWatcher = (() => {
};
})();

/**
* Call @param callback whenever a dependency (source file)/
* external dependency (non-source file) changes.
*
* Handles mapping external dependencies to their corresponding
* dependencies.
*/
export function onDependencyFileChanged(
callback: (filename_: string | null) => Promise<void>,
sourceFilesAreCompiledIntoASingleFile: boolean,
Expand Down

0 comments on commit 344860b

Please sign in to comment.