Don't count a write-only reference as a use (#17752)

* Don't count a write-only reference as a use

* Split isWriteAccess to isWriteOnlyAccess and isReadOnlyAccess

* Update "unusedParameterUsedInTypeOf" to use "b"

* Update diagnostic messages: "is never used" -> "its value is never read"

* Use a WriteKind enum

* Rename enum and move documentation to enum members
This commit is contained in:
Andy
2017-09-13 09:02:33 -07:00
committed by GitHub
parent c3199c7772
commit 2a70bf5158
157 changed files with 826 additions and 651 deletions

View File

@@ -585,7 +585,6 @@ namespace ts.server {
function createPollingWatchedFileSet(interval = 2500, chunkSize = 30) {
const watchedFiles: WatchedFile[] = [];
let nextFileToCheck = 0;
let watchTimer: any;
return { getModifiedTime, poll, startWatchTimer, addFile, removeFile };
function getModifiedTime(fileName: string): Date {
@@ -622,7 +621,7 @@ namespace ts.server {
// stat due to inconsistencies of fs.watch
// and efficiency of stat on modern filesystems
function startWatchTimer() {
watchTimer = setInterval(() => {
setInterval(() => {
let count = 0;
let nextToCheck = nextFileToCheck;
let firstCheck = -1;