From 3b6da51a81dccd18ad44dca975d8eb730b154eea Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Wed, 5 Apr 2017 11:39:59 -0700 Subject: [PATCH] remove TODO's --- src/compiler/utilities.ts | 2 +- src/harness/fourslash.ts | 1 - src/harness/projectsRunner.ts | 1 - src/services/shims.ts | 4 +--- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b5eea24782a..de54668cc8e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -4482,7 +4482,7 @@ namespace ts { newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); } - return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength:*/ newEndN - oldStartN); + return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), /*newLength*/ newEndN - oldStartN); } export function getTypeParameterOwner(d: Declaration): Declaration { diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 482b18274ec..59144237527 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -2897,7 +2897,6 @@ ${code} } } } - // TODO: should be '==='? } else if (line === "" || lineLength === 0) { // Previously blank lines between fourslash content caused it to be considered as 2 files, diff --git a/src/harness/projectsRunner.ts b/src/harness/projectsRunner.ts index 0b032832194..b0efcf4c389 100644 --- a/src/harness/projectsRunner.ts +++ b/src/harness/projectsRunner.ts @@ -111,7 +111,6 @@ class ProjectRunner extends RunnerBase { else if (url.indexOf(diskProjectPath) === 0) { // Replace the disk specific path into the project root path url = url.substr(diskProjectPath.length); - // TODO: should be '!=='? if (url.charCodeAt(0) !== ts.CharacterCodes.slash) { url = "/" + url; } diff --git a/src/services/shims.ts b/src/services/shims.ts index b2222628735..801edddb2f9 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -37,7 +37,7 @@ namespace ts { * * Or undefined value if there was no change. */ - getChangeRange(oldSnapshot: ScriptSnapshotShim): string; + getChangeRange(oldSnapshot: ScriptSnapshotShim): string | undefined; /** Releases all resources held by this script snapshot */ dispose?(): void; @@ -292,7 +292,6 @@ namespace ts { public getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange { const oldSnapshotShim = oldSnapshot; const encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); - // TODO: should this be '==='? if (encoded === null) { return null; } @@ -381,7 +380,6 @@ namespace ts { public getCompilationSettings(): CompilerOptions { const settingsJson = this.shimHost.getCompilationSettings(); - // TODO: should this be '==='? if (settingsJson === null || settingsJson === "") { throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); }