diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 5aaa331f586..0f90748f3c0 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -846,7 +846,7 @@ namespace ts { } } - type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string) => void; + type FsWatchCallback = (eventName: "rename" | "change", relativeFileName: string | undefined) => void; function createFileWatcherCallback(callback: FsWatchCallback): FileWatcherCallback { return (_fileName, eventKind) => callback(eventKind === FileWatcherEventKind.Changed ? "change" : "rename", "");