Skip to content

Commit

Permalink
Cherry-picks 544d432 into release-5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed May 29, 2023
1 parent a38e4f5 commit cede745
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/compiler/sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ function createDirectoryWatcherSupportingRecursive({
}

/** @internal */
export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined, modifiedTime?: Date) => void;
export type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined | null, modifiedTime?: Date) => void;
/** @internal */
export type FsWatch = (fileOrDirectory: string, entryKind: FileSystemEntryKind, callback: FsWatchCallback, recursive: boolean, fallbackPollingInterval: PollingInterval, fallbackOptions: WatchOptions | undefined) => FileWatcher;
/** @internal */
Expand Down Expand Up @@ -1205,7 +1205,7 @@ export function createSystemWatchFunctions({
}
}

function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined) {
function callbackChangingToMissingFileSystemEntry(event: "rename" | "change", relativeName: string | undefined | null) {
// In some scenarios, file save operation fires event with fileName.ext~ instead of fileName.ext
// To ensure we see the file going missing and coming back up (file delete and then recreated)
// and watches being updated correctly we are calling back with fileName.ext as well as fileName.ext~
Expand Down

0 comments on commit cede745

Please sign in to comment.