diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 69651c64439ca..559072eb30483 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1198,7 +1198,7 @@ namespace ts { const platform: string = _os.platform(); const useCaseSensitiveFileNames = isFileSystemCaseSensitive(); - const realpathSync = useCaseSensitiveFileNames ? _fs.realpathSync : (_fs.realpathSync.native ?? _fs.realpathSync); + const realpathSync = useCaseSensitiveFileNames ? (_fs.realpathSync.native ?? _fs.realpathSync) : _fs.realpathSync; const fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin"); const getCurrentDirectory = memoize(() => process.cwd());