diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 3987fdb6ffa..e0b74318e26 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -237,9 +237,6 @@ module FourSlash { getLength: () => { return sourceText.length; }, - getLineStartPositions: () => { - return []; - }, getChangeRange: (oldSnapshot: ts.IScriptSnapshot) => { return undefined; } diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 4d7572d9f30..1d442822866 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -72,14 +72,6 @@ module Harness.LanguageService { return this.textSnapshot.length; } - public getLineStartPositions(): string { - if (this.lineMap === null) { - this.lineMap = ts.computeLineStarts(this.textSnapshot); - } - - return JSON.stringify(this.lineMap); - } - public getChangeRange(oldScript: ts.ScriptSnapshotShim): string { var oldShim = oldScript; var range = this.scriptInfo.getTextChangeRangeBetweenVersions(oldShim.version, this.version); diff --git a/src/services/services.ts b/src/services/services.ts index c8b947161b2..c188ff84a22 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -74,13 +74,6 @@ module ts { /** Gets the length of this script snapshot. */ getLength(): number; - /** - * This call returns the array containing the start position of every line. - * i.e."[0, 10, 55]". TODO: consider making this optional. The language service could - * always determine this (albeit in a more expensive manner). - */ - getLineStartPositions(): number[]; - /** * Gets the TextChangeRange that describe how the text changed between this text and * an older version. This information is used by the incremental parser to determine @@ -106,14 +99,6 @@ module ts { return this.text.length; } - public getLineStartPositions(): number[] { - if (!this._lineStartPositions) { - this._lineStartPositions = computeLineStarts(this.text); - } - - return this._lineStartPositions; - } - public getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange { // Text-based snapshots do not support incremental parsing. Return undefined // to signal that to the caller. diff --git a/src/services/shims.ts b/src/services/shims.ts index 9e042c05a93..c9f33914e09 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -25,9 +25,6 @@ module ts { /** Gets the length of this script snapshot. */ getLength(): number; - /** This call returns the JSON-encoded array of the type: number[] */ - getLineStartPositions(): string; - /** * Returns a JSON-encoded value of the type: * { span: { start: number; length: number }; newLength: number } @@ -192,14 +189,6 @@ module ts { return this.scriptSnapshotShim.getLength(); } - public getLineStartPositions(): number[] { - if (this.lineStartPositions == null) { - this.lineStartPositions = JSON.parse(this.scriptSnapshotShim.getLineStartPositions()); - } - - return this.lineStartPositions; - } - public getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange { var oldSnapshotShim = oldSnapshot; var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim);