Enable "object-literal-shorthand" lint rule (#16987)

This commit is contained in:
Andy
2017-07-07 07:26:58 -07:00
committed by GitHub
parent dc81b456e2
commit e7dc2a67ca
32 changed files with 94 additions and 174 deletions

View File

@@ -510,6 +510,7 @@ namespace ts.server {
const watchedFiles: WatchedFile[] = [];
let nextFileToCheck = 0;
let watchTimer: any;
return { getModifiedTime, poll, startWatchTimer, addFile, removeFile };
function getModifiedTime(fileName: string): Date {
return fs.statSync(fileName).mtime;
@@ -577,14 +578,6 @@ namespace ts.server {
function removeFile(file: WatchedFile) {
unorderedRemoveItem(watchedFiles, file);
}
return {
getModifiedTime: getModifiedTime,
poll: poll,
startWatchTimer: startWatchTimer,
addFile: addFile,
removeFile: removeFile
};
}
// REVIEW: for now this implementation uses polling.