var ts;
(function (ts) {
ts.versionMajorMinor = "3.9";
- ts.version = "3.9.9";
+ ts.version = "3.9.10";
function tryGetNativeMap() {
return typeof Map !== "undefined" && "entries" in Map.prototype ? Map : undefined;
}
},
getFileSize: function (path) {
try {
- var stat = _fs.statSync(path);
- if (stat.isFile()) {
+ var stat = statSync(path);
+ if (stat === null || stat === void 0 ? void 0 : stat.isFile()) {
return stat.size;
}
}
}
};
return nodeSystem;
+ function statSync(path) {
+ return _fs.statSync(path, { throwIfNoEntry: false });
+ }
function enableCPUProfiler(path, cb) {
if (activeSession) {
cb();
if (activeSession && activeSession !== "stopping") {
var s_1 = activeSession;
activeSession.post("Profiler.stop", function (err, _a) {
+ var _b;
var profile = _a.profile;
if (!err) {
try {
- if (_fs.statSync(profilePath).isDirectory()) {
+ if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
}
}
- catch (_b) {
+ catch (_c) {
}
try {
_fs.mkdirSync(_path.dirname(profilePath), { recursive: true });
}
- catch (_c) {
+ catch (_d) {
}
_fs.writeFileSync(profilePath, JSON.stringify(cleanupPaths(profile)));
}
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
var name = ts.combinePaths(path, entry);
try {
- stat = _fs.statSync(name);
+ stat = statSync(name);
+ if (!stat) {
+ continue;
+ }
}
catch (e) {
continue;
}
function fileSystemEntryExists(path, entryKind) {
try {
- var stat = _fs.statSync(path);
+ var stat = statSync(path);
+ if (!stat) {
+ return false;
+ }
switch (entryKind) {
case 0: return stat.isFile();
case 1: return stat.isDirectory();
}
}
function getModifiedTime(path) {
+ var _a;
try {
- return _fs.statSync(path).mtime;
+ return (_a = statSync(path)) === null || _a === void 0 ? void 0 : _a.mtime;
}
catch (e) {
return undefined;